diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-11-16 19:09:46 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-11-16 19:09:46 +0100 |
commit | 0215f19146ed5c82f71e5d03ed41619975147d2a (patch) | |
tree | b879e5b6a01256dbcbb3a47890fd74762c6b6e83 | |
parent | a06cb3a55ea8943245cdc9423fd6c1cc83e88623 (diff) |
Fix sign errors in bias calculations.
-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; |