summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_main.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index e1eb7c3..89f1f3a 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -2723,14 +2723,15 @@ static void CheckAntistack(void)
const char *log_notice = "";
float teambias = 0.0f, scorebias = 0.0f, bias, handicap = 0.0f;
- if (!g_antistack.integer || level.intermissiontime)
+ if (!g_antistack.integer || level.intermissiontime) {
+ level.alienHandicap = 1.0f;
+ level.humanHandicap = 1.0f;
return;
+ }
if (level.time < level.antistackNextCheck)
return;
- level.antistackWasHandicapping = qfalse;
-
for (int i = 0; i < level.maxclients; i++) {
gclient_t *client = level.clients + i;
int score;
@@ -2757,20 +2758,21 @@ static void CheckAntistack(void)
if (aliens + humans < g_antistackPlayerThreshold.integer) {
log_notice = " (too few players)";
bias = 0.0f;
- goto out;
+ goto skip_bias;
}
if (alien_score < g_antistackScoreThreshold.integer &&
human_score < g_antistackScoreThreshold.integer) {
log_notice = " (too little score)";
bias = 0.0f;
- goto out;
+ goto skip_bias;
}
teambias = AntistackTeamBias(aliens, humans);
scorebias = AntistackScoreBias(alien_score, human_score);
bias = teambias + scorebias;
+skip_bias:
if (fabs(bias) < g_antistackBiasThreshold.value) {
log_notice = " (too little bias)";
bias = 0.0f;
@@ -2784,7 +2786,8 @@ static void CheckAntistack(void)
level.alienHandicap = 1.0f;
level.humanHandicap = 1.0f;
- goto out;
+ level.antistackWasHandicapping = qfalse;
+ goto skip_handicap;
}
level.antistackWasHandicapping = qtrue;
@@ -2816,7 +2819,7 @@ static void CheckAntistack(void)
level.humanHandicap = 1.0f;
}
-out:
+skip_handicap:
G_LogPrintf("Antistack: %dv%d %d:%d %f %f %f %i %f%s\n",
aliens, humans, alien_score, human_score, teambias,
scorebias, bias, handicap_team, handicap, log_notice);