diff options
author | /dev/humancontroller <devhc@example.com> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 17:24:20 +0200 |
commit | ecdfd00b5bff42afacd4f5267bdef9ae61bfc154 (patch) | |
tree | 18458c0ef7cd83137c188be9b4e61124765ab3a0 /src/game/g_active.c | |
parent | ade61ba16bcaa053255d8564f6ed45cfb72df13f (diff) |
implement g_gradualFreeFunds: give free funds to each player every 2 minutes, regardless of kills and deaths
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 4aa38cb..e909ca6 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1989,15 +1989,15 @@ void ClientThink_real( gentity_t *ent ) } // Give clients some credit periodically - if( ent->client->lastKillTime + FREEKILL_PERIOD < level.time ) + if( ent->client->pers.lastFreekillTime + FREEKILL_PERIOD < level.time ) { - if( !g_suddenDeath.integer ) { + if( !g_suddenDeath.integer || g_gradualFreeFunds.integer ) { if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) G_AddCreditToClient( ent->client, FREEKILL_ALIEN, qtrue ); if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) G_AddCreditToClient( ent->client, FREEKILL_HUMAN, qtrue ); } - ent->client->lastKillTime = level.time; + ent->client->pers.lastFreekillTime += FREEKILL_PERIOD; } // perform once-a-second actions |