diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-11-16 19:09:46 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2019-02-10 14:47:47 +0100 |
commit | 45f299c1bf3912e791046e051b6d824f065eb299 (patch) | |
tree | 024cc96f388d59fae2efd15058b1410f3fee3808 /src | |
parent | e3591d89ce85e80100e33cfa1ecee5e16de311dd (diff) |
Fix sign errors in bias calculations.
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index 83ca299..2cb292d 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2702,14 +2702,14 @@ static float AntistackTeamBias(int aliens, int humans) if (abs(aliens - humans) < g_antistackTeamBiasThreshold.integer) return 0.0f; - return (aliens - humans) * g_antistackTeamBiasFactor.value; + return (humans - aliens) * g_antistackTeamBiasFactor.value; } static float AntistackScoreBias(int alien_score, int human_score) { float bias; - bias = log((float)alien_score / human_score * g_antistackScoreBias.value); + bias = log((float)human_score / alien_score * g_antistackScoreBias.value); if (fabsf(bias) < g_antistackScoreBiasThreshold.value) return 0.0f; |