summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_combat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 2da926c6..94e8b265 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -181,8 +181,7 @@ float G_RewardAttackers( gentity_t *self )
// Give credits and empty the array
for( i = 0; i < level.maxclients; i++ )
{
- short num = value * self->credits[ i ] / totalDamage;
- int stageValue = num;
+ int stageValue = value * self->credits[ i ] / totalDamage;
player = g_entities + i;
if( player->client->pers.teamSelection != team )
@@ -193,12 +192,12 @@ float G_RewardAttackers( gentity_t *self )
if( !self->credits[ i ] || player->client->ps.stats[ STAT_TEAM ] == team )
continue;
- AddScore( player, num );
+ AddScore( player, stageValue );
// killing buildables earns score, but not credits
if( self->s.eType != ET_BUILDABLE )
{
- G_AddCreditToClient( player->client, num, qtrue );
+ G_AddCreditToClient( player->client, stageValue, qtrue );
// add to stage counters
if( player->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS )