From 8ec700b583a9f061072270d1c18964942f4e17fc Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 20 Jul 2014 12:01:31 +0300 Subject: Instant reward credits now count towards stage advance. --- src/game/g_combat.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 51b7005..5a522a5 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -299,8 +299,18 @@ float G_InstantRewardAttacker( gentity_t *self, gentity_t *target, float damage value *= G_RewardScaleFactor( self, target, G_TeamRewardScaleFactor( target ) ); - if( value > 0 ) + if( value > 0 ) { G_AddCreditToClient( self->client, value, qtrue ); + if( self->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) { + trap_Cvar_Set( "g_alienCredits", + va( "%d", g_alienCredits.integer + value ) ); + trap_Cvar_Update( &g_alienCredits ); + } else { + trap_Cvar_Set( "g_humanCredits", + va( "%d", g_humanCredits.integer + value ) ); + trap_Cvar_Update( &g_humanCredits ); + } + } return value; } -- cgit