X-Git-Url: https://harrygodden.com/git/?p=csRadar.git;a=blobdiff_plain;f=vmf.h;h=ff3804d8c29691add5a67d82ba4f2eb64305f4e4;hp=d2bbbd214dd21b85c74a2edf2f429481f28a67d1;hb=a53095e1511fecb8cc83c692e7ce7b23852fff16;hpb=b95752d31a7b1e224b227093f13a72d8c2b7f34b diff --git a/vmf.h b/vmf.h index d2bbbd2..ff3804d 100644 --- a/vmf.h +++ b/vmf.h @@ -288,6 +288,9 @@ ESolidResult solidgen_push( vmf_solid *ctx, vdf_node *node ) // TODO: What is this for again? surely it should be the other way around... i think... if( solid_has_displacement( node ) ) { + is_displacement = 1; + /* + printf( "solid_has_displacement\n" ); num_planes = vmf_api.bisectors; @@ -302,6 +305,7 @@ ESolidResult solidgen_push( vmf_solid *ctx, vdf_node *node ) } is_displacement = 1; + */ } int it = 0; @@ -725,6 +729,12 @@ vmf_map *vmf_init( const char *path, int load_models ) vmf_map *map = csr_calloc( sizeof( vmf_map ) ); map->root = vdf_open_file( path ); + if( !map->root ) + { + free( map ); + return NULL; + } + // Prepare instances vmf_load_all_instances( map, map->root );