summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-11-18 22:55:46 +0100
committerPaweł Redman <pawel.redman@gmail.com>2019-02-10 14:47:47 +0100
commit403b03935cfecf5553375fdf11d4198844fb431b (patch)
tree023204d33cf7c28dd6da873a3d03919eb0dd098c /src/game
parent3d9b294999100911e9cfbeb90b8ca42ebc22ce05 (diff)
Fix the team bias factor not being taken into account.
Diffstat (limited to 'src/game')
-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)