]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Argh I hate FTEQCC... Fix the bug and recommit from the revert (which was WRONG)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index 36fddb3398173175bd7473992fd7f75e3676a293..224f6ce259763962b12b88230dbe4176eef34d14 100644 (file)
@@ -348,6 +348,8 @@ void cvar_changes_init()
                BADCVAR("gametype");
                BADCVAR("g_antilag");
                BADCVAR("g_balance_teams");
+               BADCVAR("g_balance_teams_prevent_imbalance");
+               BADCVAR("g_balance_teams_scorefactor");
                BADCVAR("g_ban_sync_trusted_servers");
                BADCVAR("g_ban_sync_uri");
                BADCVAR("g_ctf_ignore_frags");
@@ -637,6 +639,8 @@ void spawnfunc_worldspawn (void)
 
        Map_MarkAsRecent(mapname);
 
+       PlayerStats_Init(); // we need this to be initiated before InitGameplayMode
+
        precache_model ("null"); // we need this one before InitGameplayMode
        InitGameplayMode();
        readlevelcvars();
@@ -910,8 +914,6 @@ void spawnfunc_worldspawn (void)
                cvar_set("sv_curl_serverpackages", substring(s, 1, -1));
        }
 
-       PlayerStats_Init();
-
        // MOD AUTHORS: change this, and possibly remove a few of the blocks below to ignore certain changes
        modname = "Xonotic";
        // physics/balance/config changes that count as mod
@@ -1978,7 +1980,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,