fix overlook introduced in 36b63e1d2c

This commit is contained in:
Garux 2021-01-30 16:50:40 +03:00
parent b29a8cb5c4
commit 2bf53ef643
3 changed files with 8 additions and 8 deletions

View File

@ -607,17 +607,17 @@ void ProcessModels( void ){
CreateMapFogs(); CreateMapFogs();
/* walk entity list */ /* walk entity list */
for ( std::size_t i = 0; i < entities.size(); ++i ) for ( mapEntityNum = 0; mapEntityNum < entities.size(); mapEntityNum++ )
{ {
/* get entity */ /* get entity */
entity = &entities[ i ]; entity = &entities[ mapEntityNum ];
if ( entity->brushes == NULL && entity->patches == NULL ) { if ( entity->brushes == NULL && entity->patches == NULL ) {
continue; continue;
} }
/* process the model */ /* process the model */
Sys_FPrintf( SYS_VRB, "############### model %i ###############\n", numBSPModels ); Sys_FPrintf( SYS_VRB, "############### model %i ###############\n", numBSPModels );
if ( i == 0 ) { if ( mapEntityNum == 0 ) {
ProcessWorldModel(); ProcessWorldModel();
} }
else{ else{

View File

@ -825,15 +825,15 @@ void PseudoCompileBSP( bool need_tree ){
BeginBSPFile(); BeginBSPFile();
models = 1; models = 1;
for ( std::size_t i = 0; i < entities.size(); ++i ) for ( mapEntityNum = 0; mapEntityNum < entities.size(); mapEntityNum++ )
{ {
/* get entity */ /* get entity */
entity = &entities[ i ]; entity = &entities[ mapEntityNum ];
if ( entity->brushes == NULL && entity->patches == NULL ) { if ( entity->brushes == NULL && entity->patches == NULL ) {
continue; continue;
} }
if ( i != 0 ) { if ( mapEntityNum != 0 ) {
sprintf( modelValue, "*%d", models++ ); sprintf( modelValue, "*%d", models++ );
entity->setKeyValue( "model", modelValue ); entity->setKeyValue( "model", modelValue );
} }
@ -847,7 +847,7 @@ void PseudoCompileBSP( bool need_tree ){
ClearMetaTriangles(); ClearMetaTriangles();
PatchMapDrawSurfs( entity ); PatchMapDrawSurfs( entity );
if ( i == 0 && need_tree ) { if ( mapEntityNum == 0 && need_tree ) {
faces = MakeStructuralBSPFaceList( entities[0].brushes ); faces = MakeStructuralBSPFaceList( entities[0].brushes );
tree = FaceBSP( faces ); tree = FaceBSP( faces );
node = tree->headnode; node = tree->headnode;

View File

@ -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 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 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; Q_EXTERN int entitySourceBrushes;