X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=224f6ce259763962b12b88230dbe4176eef34d14;hb=9e17e0bc2f1af717f39d364ba26ef3a308842e17;hp=f2ce297010bd567ec72b6f810794fd6689017530;hpb=8ec332c7d3cffdc6b39c3ada385fa41995630589;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index f2ce29701..224f6ce25 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -348,7 +348,8 @@ void cvar_changes_init() BADCVAR("gametype"); BADCVAR("g_antilag"); BADCVAR("g_balance_teams"); - BADCVAR("g_balance_teams_force"); + 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"); @@ -638,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(); @@ -911,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 @@ -1979,6 +1980,9 @@ 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 @@ -2167,6 +2171,11 @@ 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)