summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_active.c7
-rw-r--r--src/game/g_local.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 93ae76f0..e3f09d69 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -1332,7 +1332,12 @@ void ClientThink_real( gentity_t *ent )
// Give clients some credit periodically
if( ent->client->lastKillTime + FREEKILL_PERIOD < level.time )
{
- if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ if( g_suddenDeathTime.integer &&
+ ( level.time - level.startTime >= g_suddenDeathTime.integer * 60000 ) )
+ {
+ //gotta love logic like this eh?
+ }
+ else if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
G_AddCreditToClient( ent->client, FREEKILL_ALIEN, qtrue );
else if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
G_AddCreditToClient( ent->client, FREEKILL_HUMAN, qtrue );
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 30d0e42e..4b18234f 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -963,6 +963,7 @@ extern vmCvar_t g_maxGameClients; // allow this many active
extern vmCvar_t g_restarted;
extern vmCvar_t g_timelimit;
+extern vmCvar_t g_suddenDeathTime;
extern vmCvar_t g_friendlyFire;
extern vmCvar_t g_password;
extern vmCvar_t g_needpass;