From c0294fce2fc53fa842bee72bec70b81481591d2a Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 18 Nov 2018 22:55:46 +0100 Subject: Fix the team bias factor not being taken into account. --- src/game/g_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/game/g_main.c') 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) -- cgit