summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-08-05 23:02:22 +0000
committerTim Angus <tim@ngus.net>2005-08-05 23:02:22 +0000
commit2fda7c89948df9abe53fd273b62e29f7e36a59e8 (patch)
tree73d98f5acd0d109df4683c78700a4c2be0ea770f /src/game
parent8fe663ec0bcb52ae2b805a07d46b78fb425b3f50 (diff)
* Added g_suddenDeathTime - when this time is passed all build points are taken away
* Server should no longer need a client connected to change map when the timelimit hits
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index c0c37589..98566cb4 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -34,6 +34,7 @@ gclient_t g_clients[ MAX_CLIENTS ];
vmCvar_t g_fraglimit;
vmCvar_t g_timelimit;
+vmCvar_t g_suddenDeathTime;
vmCvar_t g_capturelimit;
vmCvar_t g_friendlyFire;
vmCvar_t g_password;
@@ -111,6 +112,7 @@ static cvarTable_t gameCvarTable[ ] =
// change anytime vars
{ &g_timelimit, "timelimit", "0", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue },
+ { &g_suddenDeathTime, "g_suddenDeathTime", "0", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue },
{ &g_synchronousClients, "g_synchronousClients", "0", CVAR_SYSTEMINFO, 0, qfalse },
@@ -908,6 +910,18 @@ void G_CalculateBuildPoints( void )
int localHTP = g_humanBuildPoints.integer,
localATP = g_alienBuildPoints.integer;
+ if( g_suddenDeathTime.integer && !level.warmupTime &&
+ ( level.time - level.startTime >= g_suddenDeathTime.integer * 60000 ) )
+ {
+ localHTP = 0;
+ localATP = 0;
+ }
+ else
+ {
+ localHTP = g_humanBuildPoints.integer;
+ localATP = g_alienBuildPoints.integer;
+ }
+
level.humanBuildPoints = level.humanBuildPointsPowered = localHTP;
level.alienBuildPoints = localATP;
@@ -1514,6 +1528,13 @@ void CheckIntermissionExit( void )
gclient_t *cl;
int readyMask;
+ //if no clients are connected, just exit
+ if( !level.numConnectedClients )
+ {
+ ExitLevel( );
+ return;
+ }
+
// see which players are ready
ready = 0;
notReady = 0;