From: Rudolf Polzer Date: Tue, 24 Jul 2012 08:41:23 +0000 (+0200) Subject: fix game completion ratio when there is no fraglimit X-Git-Tag: xonotic-v0.7.0~311^2~3 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=4cd2c83dabc9718abcd253f56bce571adfdc32a4;hp=-c;p=xonotic%2Fxonotic-data.pk3dir.git fix game completion ratio when there is no fraglimit --- 4cd2c83dabc9718abcd253f56bce571adfdc32a4 diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 36fddb339..7a653e131 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1978,7 +1978,8 @@ float WinningCondition_Scores(float limit, float leadlimit) limitreached = (limitreached || leadlimitreached); } - game_completion_ratio = max(game_completion_ratio, bound(0, WinningConditionHelper_topscore / max(1, limit), 1)); + if(limit) + game_completion_ratio = max(game_completion_ratio, bound(0, WinningConditionHelper_topscore / limit, 1)); return GetWinningCode( WinningConditionHelper_topscore && limitreached,