X-Git-Url: https://harrygodden.com/git/?p=convexer.git;a=blobdiff_plain;f=cxr%2Fcxr.h;fp=cxr%2Fcxr.h;h=0585f1a240bcc66165bb3a1081844734eab2a04a;hp=1f1c649d88b533e95e32c895d1f1be6d76bca4b2;hb=2b81894272ade16dbe3f71514e8eb25b2962bf9e;hpb=12102f7b89f21fe5148e9a4506f505fcaef98da2 diff --git a/cxr/cxr.h b/cxr/cxr.h index 1f1c649..0585f1a 100644 --- a/cxr/cxr.h +++ b/cxr/cxr.h @@ -1,11 +1,13 @@ /* - CONVEXER v0.91 + CONVEXER v0.95 A GNU/Linux-first Source1 Hammer replacement built with Blender, for mapmakers Copyright (C) 2022 Harry Godden (hgn) +LICENSE: GPLv3.0, please see COPYING and LICENSE for more information + Features: - Brush decomposition into convex pieces for well defined geometry - Freely form displacements without limits @@ -303,6 +305,13 @@ enum cxr_soliderr const char *cxr_build_time = __DATE__ " @" __TIME__; #endif +#if _WIN32 || _WIN64 +#if _WIN64 +#else +#warning 32 bit is not supported in blender 3.0 +#endif +#endif + static void (*cxr_log_func)(const char *str); static void (*cxr_line_func)( v3f p0, v3f p1, v4f colour ); @@ -2970,6 +2979,8 @@ static int cxr_write_disp( cxr_mesh *mesh, cxr_world *world, if( !newvert ) { + free( graph ); + free( vertinfo ); return 0; } } @@ -3032,9 +3043,6 @@ static int cxr_write_disp( cxr_mesh *mesh, cxr_world *world, } } -#ifdef CXR_DEBUG - cxr_log( "Broken displacement!\n" ); -#endif free( graph ); free( vertinfo ); return 0; @@ -3336,7 +3344,10 @@ CXR_API void cxr_push_world_vmf( cxr_world *world, cxr_vmf_context *ctx, if( solid->displacement ) { - cxr_write_disp( solid->pmesh, world, ctx, output ); + if( !cxr_write_disp( solid->pmesh, world, ctx, output ) ) + { + cxr_log( "Warning: Invalid displacement\n" ); + } continue; }