summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-11-18 22:55:46 +0100
committerPaweł Redman <pawel.redman@gmail.com>2018-11-18 22:55:46 +0100
commitc0294fce2fc53fa842bee72bec70b81481591d2a (patch)
tree95faee6ffbfd1b6382a03598585095ddb6e17c70
parent3804fbcbc1776a075826f5233dfbe95b1796a3c5 (diff)
Fix the team bias factor not being taken into account.
-rw-r--r--src/game/g_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 9d3f04b..94d664e 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -2701,13 +2701,17 @@ CheckAntistack
static float AntistackTeamBias(int aliens, int humans)
{
+ float bias;
+
if (abs(aliens - humans) < g_antistackTeamBiasThreshold.integer)
return 0.0f;
if (humans > aliens)
- return (humans - aliens - g_antistackTeamBiasThreshold.integer + 1);
+ bias = (humans - aliens - g_antistackTeamBiasThreshold.integer + 1);
else
- return (humans - aliens + g_antistackTeamBiasThreshold.integer - 1);
+ bias = (humans - aliens + g_antistackTeamBiasThreshold.integer - 1);
+
+ return bias * g_antistackTeamBiasFactor.value;
}
static float AntistackScoreBias(int alien_score, int human_score)