From 417bea6ab0c4760891814292fc4c56ed21fbd41d Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sat, 26 Jul 2014 00:52:02 +0300 Subject: Kill rewards towards stages are now scaled by the correct multiplier. Fixed a bug in applying instant rewards towards stages that caused instant s3. --- src/game/g_combat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game') diff --git a/src/game/g_combat.c b/src/game/g_combat.c index c10c8da..c79594d 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -303,11 +303,11 @@ float G_InstantRewardAttacker( gentity_t *self, gentity_t *target, float damage 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 ) ); + va( "%d", (int) (g_alienCredits.integer + value) ) ); trap_Cvar_Update( &g_alienCredits ); } else { trap_Cvar_Set( "g_humanCredits", - va( "%d", g_humanCredits.integer + value ) ); + va( "%d", (int) (g_humanCredits.integer + value) ) ); trap_Cvar_Update( &g_humanCredits ); } } @@ -401,11 +401,11 @@ float G_RewardAttackers( gentity_t *self ) if( player->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) { level.alienRewardKills += killValue; G_AddCreditToClient( player->client, g_KillRewardMultiplierH.value*stageValue, qtrue ); - alienCredits += stageValue; + alienCredits += g_KillRewardMultiplierH.value*stageValue; } else if( player->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) { level.humanRewardKills += killValue; G_AddCreditToClient( player->client, g_KillRewardMultiplierA.value*stageValue, qtrue ); - humanCredits += stageValue; + humanCredits += g_KillRewardMultiplierA.value*stageValue; } } } -- cgit