summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-13 11:30:00 +0000
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:24:19 +0200
commit253c9f1c8a1801736ab77098a407fafafd83f603 (patch)
tree4ab678fb0628383054464b8d2c748298734e6bf6
parent743e3bb853419bfcc5267449cbc032774a055d2b (diff)
use a proper check for a buildable type; count not-yet-spawned spawns towards spawncount
-rw-r--r--src/game/g_main.c7
1 files 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++;
}