From: Martin Taibr <taibr.martin@gmail.com>
Date: Sun, 22 Mar 2020 11:01:11 +0000 (+0100)
Subject: remove unused global: game_completion_ratio
X-Git-Tag: xonotic-v0.8.5~1133^2~11
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54e706e1fbfb0fe8d811f6a79557a9a1ac839b8b;p=xonotic%2Fxonotic-data.pk3dir.git

remove unused global: game_completion_ratio
---

diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh
index 29621f61d..910ea215f 100644
--- a/qcsrc/server/defs.qh
+++ b/qcsrc/server/defs.qh
@@ -140,7 +140,6 @@ float blockSpectators; //if set, new or existing spectators or observers will be
 .float spectatortime; //point in time since the client is spectating or observing
 void checkSpectatorBlock(entity this);
 
-float game_completion_ratio; // 0 at start, 1 near end
 .float winning;
 .float jointime; // time of connecting
 .float startplaytime; // time of switching from spectator to player
diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc
index aa4c5f505..8ec26efd6 100644
--- a/qcsrc/server/g_world.qc
+++ b/qcsrc/server/g_world.qc
@@ -1800,9 +1800,6 @@ float WinningCondition_Scores(float limit, float leadlimit)
 			limitreached = (limitreached || leadlimitreached);
 	}
 
-	if(limit)
-		game_completion_ratio = max(game_completion_ratio, bound(0, WinningConditionHelper_topscore / limit, 1));
-
 	return GetWinningCode(
 		WinningConditionHelper_topscore && limitreached,
 		WinningConditionHelper_equality
@@ -1940,11 +1937,6 @@ void CheckRules_World()
 	float wantovertime;
 	wantovertime = 0;
 
-	if(timelimit > game_starttime)
-		game_completion_ratio = (time - game_starttime) / (timelimit - game_starttime);
-	else
-		game_completion_ratio = 0;
-
 	if(checkrules_suddendeathend)
 	{
 		if(!checkrules_suddendeathwarning)