mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
minor tweaks
This commit is contained in:
@@ -218,10 +218,9 @@ static void FixBrushSides( const entity_t& e ){
|
||||
Sys_FPrintf( SYS_VRB, "--- FixBrushSides ---\n" );
|
||||
|
||||
/* walk list of drawsurfaces */
|
||||
for ( int i = e.firstDrawSurf; i < numMapDrawSurfs; ++i )
|
||||
for ( const mapDrawSurface_t& ds : Span( mapDrawSurfs + e.firstDrawSurf, mapDrawSurfs + numMapDrawSurfs ) )
|
||||
{
|
||||
/* get surface and try to early out */
|
||||
const mapDrawSurface_t& ds = mapDrawSurfs[ i ];
|
||||
/* try to early out */
|
||||
if ( ds.outputNum < 0 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ void ClassifyEntitySurfaces( const entity_t& e ){
|
||||
/* note it */
|
||||
Sys_FPrintf( SYS_VRB, "--- ClassifyEntitySurfaces ---\n" );
|
||||
|
||||
/* walk the surface list */
|
||||
/* walk the surface list */ /* numMapDrawSurfs may grow in FinishSurface() */
|
||||
for ( int i = e.firstDrawSurf; i < numMapDrawSurfs; ++i )
|
||||
{
|
||||
FinishSurface( mapDrawSurfs[ i ] );
|
||||
@@ -2892,7 +2892,7 @@ void AddEntitySurfaceModels( entity_t& e ){
|
||||
/* note it */
|
||||
Sys_FPrintf( SYS_VRB, "--- AddEntitySurfaceModels ---\n" );
|
||||
|
||||
/* walk the surface list */
|
||||
/* walk the surface list */ /* numMapDrawSurfs grows here; do we want SurfaceModels on model surfaces? (can create infinite loop) */
|
||||
for ( int i = e.firstDrawSurf; i < numMapDrawSurfs; ++i )
|
||||
numSurfaceModels += AddSurfaceModels( mapDrawSurfs[ i ], e );
|
||||
}
|
||||
@@ -2952,6 +2952,7 @@ void FilterDrawsurfsIntoTree( entity_t& e, tree_t& tree ){
|
||||
numSurfs = 0;
|
||||
numRefs = 0;
|
||||
numSkyboxSurfaces = 0;
|
||||
/* numMapDrawSurfs can grow here */
|
||||
for ( int i = e.firstDrawSurf; i < numMapDrawSurfs; ++i )
|
||||
{
|
||||
/* get surface and try to early out */
|
||||
|
||||
@@ -500,10 +500,9 @@ void FixTJunctions( const entity_t& ent ){
|
||||
// this actually creates axial edges, but it
|
||||
// only creates originalEdge_t structures
|
||||
// for non-axial edges
|
||||
for ( int i = ent.firstDrawSurf; i < numMapDrawSurfs; ++i )
|
||||
for ( mapDrawSurface_t& ds : Span( mapDrawSurfs + ent.firstDrawSurf, mapDrawSurfs + numMapDrawSurfs ) )
|
||||
{
|
||||
/* get surface and early out if possible */
|
||||
mapDrawSurface_t& ds = mapDrawSurfs[ i ];
|
||||
/* early out if possible */
|
||||
const shaderInfo_t *si = ds.shaderInfo;
|
||||
if ( ( si->compileFlags & C_NODRAW ) || si->autosprite || si->notjunc || ds.verts.empty() ) {
|
||||
continue;
|
||||
@@ -545,10 +544,9 @@ void FixTJunctions( const entity_t& ent ){
|
||||
Sys_FPrintf( SYS_VRB, "%9d degenerate edges\n", c_degenerateEdges );
|
||||
|
||||
// insert any needed vertexes
|
||||
for ( int i = ent.firstDrawSurf; i < numMapDrawSurfs; ++i )
|
||||
for ( mapDrawSurface_t& ds : Span( mapDrawSurfs + ent.firstDrawSurf, mapDrawSurfs + numMapDrawSurfs ) )
|
||||
{
|
||||
/* get surface and early out if possible */
|
||||
mapDrawSurface_t& ds = mapDrawSurfs[ i ];
|
||||
/* early out if possible */
|
||||
const shaderInfo_t *si = ds.shaderInfo;
|
||||
if ( ( si->compileFlags & C_NODRAW ) || si->autosprite || si->notjunc || ds.verts.empty() || ds.type != ESurfaceType::Face ) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user