From 253c9f1c8a1801736ab77098a407fafafd83f603 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Thu, 13 Apr 2017 11:30:00 +0000 Subject: use a proper check for a buildable type; count not-yet-spawned spawns towards spawncount --- src/game/g_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/g_main.c b/src/game/g_main.c index d9dcd66..68043d8 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1361,13 +1361,14 @@ void G_CountSpawns( void ) for( i = 1, ent = g_entities + i ; i < level.num_entities ; i++, ent++ ) { - if( !ent->inuse ) + if( !ent->inuse || ent->s.eType != ET_BUILDABLE || + ( ent->spawned && ent->health <= 0 ) ) continue; - if( ent->s.modelindex == BA_A_SPAWN && ent->health > 0 ) + if( ent->s.modelindex == BA_A_SPAWN ) level.numAlienSpawns++; - if( ent->s.modelindex == BA_H_SPAWN && ent->health > 0 ) + if( ent->s.modelindex == BA_H_SPAWN ) level.numHumanSpawns++; } -- cgit