diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/g_main.c | 4 | ||||
-rw-r--r-- | src/game/g_team.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_local.h b/src/game/g_local.h index 183985b..179144c 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -625,6 +625,7 @@ typedef struct int numAlienSpawns; int numHumanSpawns; + int numHumanArmouries; int numAlienClients; int numHumanClients; diff --git a/src/game/g_main.c b/src/game/g_main.c index bd3fef0..977ab1e 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1093,6 +1093,7 @@ void G_CountSpawns( void ) level.numAlienSpawns = 0; level.numHumanSpawns = 0; + level.numHumanArmouries = 0; for( i = 1, ent = g_entities + i ; i < level.num_entities ; i++, ent++ ) { if( !ent->inuse || ent->s.eType != ET_BUILDABLE || ent->health <= 0 ) @@ -1103,6 +1104,9 @@ void G_CountSpawns( void ) if( ent->s.modelindex == BA_H_SPAWN ) level.numHumanSpawns++; + + if( ent->powered && ent->s.modelindex == BA_H_ARMOURY ) + level.numHumanArmouries++; } } diff --git a/src/game/g_team.c b/src/game/g_team.c index 45a2370..debe11f 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -542,7 +542,7 @@ void CheckTeamStatus( void ) level.numTeamImbalanceWarnings++; G_BalanceTeams(); } - else if( level.numHumanSpawns > 0 && + else if( level.numHumanSpawns > 0 && level.numHumanArmouries > 0 && level.numAlienClients - level.numHumanClients >= 2 ) { trap_SendServerCommand ( -1, "print \"^5Teams are imbalanced. " |