diff options
author | Mikko Tiusanen <ams@daug.net> | 2014-07-20 12:01:31 +0300 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2014-07-20 12:01:31 +0300 |
commit | 8ec700b583a9f061072270d1c18964942f4e17fc (patch) | |
tree | 6418a54d8545549df66026d44f60359b7f13652c /src/game/g_combat.c | |
parent | fd583746b10f0b8d2a96305eef89ecb179cb3d24 (diff) |
Instant reward credits now count towards stage advance.
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 12 |
1 files changed, 11 insertions, 1 deletions
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; } |