diff options
author | Asa Kravets <norfenstein@gmail.com> | 2010-07-30 01:11:00 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:40 +0000 |
commit | 9b7521e08f23bbc9778d29c92e13efd30478abf2 (patch) | |
tree | 71672bff675a8df4e8b7921acf3f9a1cad5cc0b9 /src/game | |
parent | feb86639efdd7d548247c15cdf16443b26e474a8 (diff) |
Don't give funds for damage done by non-players (thanks Lakitu7)
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_combat.c | 7 |
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 ) |