summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
authorMikko Tiusanen <ams@daug.net>2014-07-26 00:52:02 +0300
committerMikko Tiusanen <ams@daug.net>2014-07-26 00:52:02 +0300
commit417bea6ab0c4760891814292fc4c56ed21fbd41d (patch)
treea72a02f7663707df05215440065942fb98e3285b /src/game/g_combat.c
parent73fa3f4498b3b477233f3aa0b2cc2d0a2cc726be (diff)
Kill rewards towards stages are now scaled by the correct multiplier.
Fixed a bug in applying instant rewards towards stages that caused instant s3.
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c8
1 files changed, 4 insertions, 4 deletions
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;
}
}
}