diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-04-12 00:06:59 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-04-12 00:06:59 +0200 |
commit | 0175e7359309ffc34eeac159e69fc8bf78f2f226 (patch) | |
tree | 0d990875335c95eb454a8035534c3a44767f0767 /src/game | |
parent | a4ddb9802e76d6fdce084111a9c1b1cc56f35f37 (diff) |
Implement g_emptyTeamsSkipMapTime.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index 18f4f50..26a4537 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -208,8 +208,8 @@ vmCvar_t g_MaxAlienExtraBuildPoints; vmCvar_t g_MinHumanExtraBuildPoints; vmCvar_t g_MaxHumanExtraBuildPoints; vmCvar_t g_BuildingCreditsFactor; - vmCvar_t g_buildPointDeletion; +vmCvar_t g_emptyTeamsSkipMapTime; // copy cvars that can be set in worldspawn so they can be restored later static char cv_gravity[ MAX_CVAR_VALUE_STRING ]; @@ -388,8 +388,8 @@ static cvarTable_t gameCvarTable[ ] = { &g_MinHumanExtraBuildPoints, "g_MinHumanExtraBuildPoints", "-800", CVAR_ARCHIVE, 0, qfalse }, { &g_MaxHumanExtraBuildPoints, "g_MaxHumanExtraBuildPoints", "800", CVAR_ARCHIVE, 0, qfalse }, { &g_BuildingCreditsFactor, "g_BuildingCreditsFactor", "0.25", CVAR_ARCHIVE, 0, qfalse }, - - { &g_buildPointDeletion, "g_buildPointDeletion", "1", CVAR_ARCHIVE, 0, qfalse } + { &g_buildPointDeletion, "g_buildPointDeletion", "1", CVAR_ARCHIVE, 0, qfalse }, + { &g_emptyTeamsSkipMapTime, "g_emptyTeamsSkipMapTime", "15", CVAR_ARCHIVE, 0, qfalse } }; static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] ); @@ -2483,13 +2483,13 @@ void CheckExitRules( void ) LogExit( "Aliens win." ); G_MapLog_Result( 'a' ); } - else if( level.suddenDeathBeginTime != 0 && - level.time > level.suddenDeathBeginTime/2 && - level.numAlienClients == 0 && level.numHumanClients == 0 ) + else if( g_emptyTeamsSkipMapTime.integer && + ( level.time - level.startTime ) / 60000 >= + g_emptyTeamsSkipMapTime.integer && + level.numAlienClients == 0 && level.numHumanClients == 0 ) { - // Close to sudden death started but no clients connected level.lastWin = TEAM_NONE; - trap_SendServerCommand( -1, "print \"Half way to sudden death reached with empty teams\n\"" ); + trap_SendServerCommand( -1, "print \"Empty teams skip map time exceeded.\n\"" ); trap_SetConfigstring( CS_WINNER, "Stalemate" ); LogExit( "Timelimit hit." ); G_MapLog_Result( 't' ); |