diff options
Diffstat (limited to 'src')
-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; } |