summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 94d664e..dfa45ab 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -2722,7 +2722,11 @@ static float AntistackScoreBias(int alien_score, int human_score)
if (fabsf(bias) < g_antistackScoreBiasThreshold.value)
return 0.0f;
- return bias * g_antistackScoreBiasFactor.value;
+ bias *= g_antistackScoreBiasFactor.value;;
+ if (isnanf(bias)) // ±inf * 0
+ return 0.0f;
+
+ return bias;
}
static void CheckAntistack(void)