X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fwritebsp.c;h=4cdd3a99e7b7c31a3c7c1d982cfbf7a14db73cd0;hp=7fb51d83630e85baa920a8836f4f1107abfb2796;hb=cc4e44e31a89c8efed942ca26e2a341466f9a3b2;hpb=5265d3cc1517566910718738ee6fa48e2466d3ea diff --git a/tools/quake3/q3map2/writebsp.c b/tools/quake3/q3map2/writebsp.c index 7fb51d83..4cdd3a99 100644 --- a/tools/quake3/q3map2/writebsp.c +++ b/tools/quake3/q3map2/writebsp.c @@ -1,4 +1,5 @@ -/* +/* ------------------------------------------------------------------------------- + Copyright (C) 1999-2007 id Software, Inc. and contributors. For a list of contributors, see the accompanying CONTRIBUTORS file. @@ -84,7 +85,7 @@ int EmitShader( const char *shader, int *contentFlags, int *surfaceFlags ) bspShaders[ i ].contentFlags = *contentFlags; /* recursively emit any damage shaders */ - if( si->damageShader[ 0 ] != '\0' ) + if( si->damageShader != NULL && si->damageShader[ 0 ] != '\0' ) { Sys_FPrintf( SYS_VRB, "Shader %s has damage shader %s\n", si->shader, si->damageShader ); EmitShader( si->damageShader, NULL, NULL ); @@ -135,7 +136,6 @@ void EmitLeaf( node_t *node ) bspLeaf_t *leaf_p; brush_t *b; drawSurfRef_t *dsr; - int i = 0; /* check limits */ @@ -157,7 +157,7 @@ void EmitLeaf( node_t *node ) for( b = node->brushlist; b; b = b->next ) { /* something is corrupting brushes */ - if( (int) b < 256 ) + if( (size_t) b < 256 ) { Sys_Printf( "WARNING: Node brush list corrupted (0x%08X)\n", b ); break; @@ -400,6 +400,8 @@ void EndBSPFile( void ) char path[ 1024 ]; + Sys_FPrintf( SYS_VRB, "--- EndBSPFile ---\n" ); + EmitPlanes(); numBSPEntities = numEntities; @@ -459,10 +461,6 @@ void EmitBrushes( brush_t *brushes, int *firstBrush, int *numBrushes ) /* set output number to bogus initially */ b->sides[ j ].outputNum = -1; - /* don't emit generated backSide sides */ - if ( b->sides[ j ].backSide ) - continue; - /* check count */ if( numBSPBrushSides == MAX_MAP_BRUSHSIDES ) Error( "MAX_MAP_BRUSHSIDES ");