diff options
author | Mikko Tiusanen <ams@daug.net> | 2015-03-24 22:07:07 +0200 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2015-03-24 22:07:07 +0200 |
commit | 216fc980dd8221198e491745a0eaa029c37f74d3 (patch) | |
tree | 2421401ab51d0bc76b74388a9e450f9b1cc2ff0f /src/game/g_combat.c | |
parent | d6a114274103ec2198370d636fe27b545ba651d7 (diff) |
Fixed issues with credit gain scaling and changed the scaling to be non linear.
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 966e595..eb7f48e 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -203,11 +203,11 @@ float G_RewardScaleFactor( gentity_t *self, gentity_t *target ) targetScore = level.alienRewardScore/level.humanRewardScore; break; default: - return 0; + return 0.0f; } if ( target->client != NULL ) { - if( self->client->ps.persistant[ PERS_SCORE ] <= 0 || target->client->ps.persistant[ PERS_SCORE ] <= 0) return targetScore; - targetScore *= target->client->ps.persistant[ PERS_SCORE ]/self->client->ps.persistant[ PERS_SCORE ]; + if( self->client->ps.persistant[ PERS_SCORE ] > 0 && target->client->ps.persistant[ PERS_SCORE ] > 0) + targetScore *= pow(target->client->ps.persistant[ PERS_SCORE ],g_RewardFactorPower.value)/pow(self->client->ps.persistant[ PERS_SCORE ],g_RewardFactorPower.value); } targetScore *= 1.0f-g_ConstantRewardFactor.value; targetScore += g_ConstantRewardFactor.value; |