summaryrefslogtreecommitdiff
path: root/src/game/g_main.c
diff options
context:
space:
mode:
authorMikko Tiusanen <ams@daug.net>2014-07-06 17:56:57 +0300
committerMikko Tiusanen <ams@daug.net>2014-07-06 17:56:57 +0300
commit0afc9cdcc596eb0ad9b6630b95b2e55df7337030 (patch)
tree53a9f94836de9f697416fdedd06b0efc489e387c /src/game/g_main.c
parent595fbed7d45e2c1434217ae3a8f86510a56d79b9 (diff)
Fixed auto g_teamForceBalance = 2 handling.
Fixed colors in certain commands. Correct message now displayed in slap.
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r--src/game/g_main.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 11376ac..4da0808 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1039,7 +1039,7 @@ Spawn queued clients
*/
void G_SpawnClients( team_t team )
{
- int clientNum;
+ int i, clientNum;
gentity_t *ent, *spawn;
vec3_t spawn_origin, spawn_angles;
spawnQueue_t *sq = NULL;
@@ -1053,9 +1053,7 @@ void G_SpawnClients( team_t team )
!level.humanTeamLocked &&
!level.alienTeamLocked &&
level.numAlienClients-level.numHumanClients > 1 )
- {
- return;
- }
+ numSpawns = -1;
}
else if( team == TEAM_HUMANS )
{
@@ -1065,11 +1063,26 @@ void G_SpawnClients( team_t team )
!level.humanTeamLocked &&
!level.alienTeamLocked &&
level.numHumanClients-level.numAlienClients > 1 )
+ numSpawns = -1;
+ }
+
+ if( numSpawns == -1 )
+ {
+ for( i = 0; i < MAX_CLIENTS; i++ )
{
+ clientNum = sq->clients[ i ];
+ if (clientNum == -1) continue;
+ ent = &g_entities[ clientNum ];
+ // NOTE: Using notrackendtime for the client spawn warning counter as it gets reset on client spawn.
+ if ( level.time >= ent->client->notrackEndTime )
+ {
+ trap_SendServerCommand( ent->client - level.clients, "print \"Your team has more players. Either switch to the other team or wait for someone in your team to die....\n\"");
+ ent->client->notrackEndTime = level.time+10000;
+ }
return;
}
}
-
+
if( G_GetSpawnQueueLength( sq ) > 0 && numSpawns > 0 )
{
clientNum = G_PeekSpawnQueue( sq );