X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fmodel.c;h=1343ac049b2895a8e6a10ec12e49354391e6676a;hb=9c4c8b725fdca551dc9379b77ebd9c498d0c6f28;hp=de495b0092504bf1a99100791f4d07438e6414dc;hpb=4f80165b29510dac0d86a230993a04717143e542;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/q3map2/model.c b/tools/quake3/q3map2/model.c index de495b00..1343ac04 100644 --- a/tools/quake3/q3map2/model.c +++ b/tools/quake3/q3map2/model.c @@ -652,8 +652,15 @@ void InsertModel( const char *name, int skin, int frame, m4x4_t transform, remap /* set up brush sides */ buildBrush->numsides = 5; buildBrush->sides[ 0 ].shaderInfo = si; - for ( j = 1; j < buildBrush->numsides; j++ ) - buildBrush->sides[ j ].shaderInfo = NULL; // don't emit these faces as draw surfaces, should make smaller BSPs; hope this works + for ( j = 1; j < buildBrush->numsides; j++ ) { + if ( debugClip ) { + buildBrush->sides[ 0 ].shaderInfo = ShaderInfoForShader( "debugclip2" ); + buildBrush->sides[ j ].shaderInfo = ShaderInfoForShader( "debugclip" ); + } + else { + buildBrush->sides[ j ].shaderInfo = NULL; // don't emit these faces as draw surfaces, should make smaller BSPs; hope this works + } + } buildBrush->sides[ 0 ].planenum = FindFloatPlane( plane, plane[ 3 ], 3, points ); buildBrush->sides[ 1 ].planenum = FindFloatPlane( pa, pa[ 3 ], 2, &points[ 1 ] ); // pa contains points[1] and points[2] @@ -714,6 +721,8 @@ void AddTriangleModels( entity_t *e ){ /* note it */ Sys_FPrintf( SYS_VRB, "--- AddTriangleModels ---\n" ); + doingModelClip = qtrue; + /* get current brush entity targetname */ if ( e == entities ) { targetName = ""; @@ -961,4 +970,6 @@ void AddTriangleModels( entity_t *e ){ remap = remap2; } } + + doingModelClip = qfalse; }