diff --git a/tools/quake3/q3map2/bsp.cpp b/tools/quake3/q3map2/bsp.cpp index 9b76be72..5caeba79 100644 --- a/tools/quake3/q3map2/bsp.cpp +++ b/tools/quake3/q3map2/bsp.cpp @@ -607,17 +607,17 @@ void ProcessModels( void ){ CreateMapFogs(); /* walk entity list */ - for ( std::size_t i = 0; i < entities.size(); ++i ) + for ( mapEntityNum = 0; mapEntityNum < entities.size(); mapEntityNum++ ) { /* get entity */ - entity = &entities[ i ]; + entity = &entities[ mapEntityNum ]; if ( entity->brushes == NULL && entity->patches == NULL ) { continue; } /* process the model */ Sys_FPrintf( SYS_VRB, "############### model %i ###############\n", numBSPModels ); - if ( i == 0 ) { + if ( mapEntityNum == 0 ) { ProcessWorldModel(); } else{ diff --git a/tools/quake3/q3map2/convert_bsp.cpp b/tools/quake3/q3map2/convert_bsp.cpp index 661864a9..f6a8d1d4 100644 --- a/tools/quake3/q3map2/convert_bsp.cpp +++ b/tools/quake3/q3map2/convert_bsp.cpp @@ -825,15 +825,15 @@ void PseudoCompileBSP( bool need_tree ){ BeginBSPFile(); models = 1; - for ( std::size_t i = 0; i < entities.size(); ++i ) + for ( mapEntityNum = 0; mapEntityNum < entities.size(); mapEntityNum++ ) { /* get entity */ - entity = &entities[ i ]; + entity = &entities[ mapEntityNum ]; if ( entity->brushes == NULL && entity->patches == NULL ) { continue; } - if ( i != 0 ) { + if ( mapEntityNum != 0 ) { sprintf( modelValue, "*%d", models++ ); entity->setKeyValue( "model", modelValue ); } @@ -847,7 +847,7 @@ void PseudoCompileBSP( bool need_tree ){ ClearMetaTriangles(); PatchMapDrawSurfs( entity ); - if ( i == 0 && need_tree ) { + if ( mapEntityNum == 0 && need_tree ) { faces = MakeStructuralBSPFaceList( entities[0].brushes ); tree = FaceBSP( faces ); node = tree->headnode; diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 1535d005..673cfa14 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -2074,7 +2074,7 @@ Q_EXTERN int sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE ); /* li Q_EXTERN int minSampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE ); /* minimum sample size to use at all */ Q_EXTERN int sampleScale; /* vortex: lightmap sample scale (ie quality)*/ -Q_EXTERN int mapEntityNum Q_ASSIGN( 0 ); +Q_EXTERN std::size_t mapEntityNum Q_ASSIGN( 0 ); Q_EXTERN int entitySourceBrushes;