From: Mario Date: Fri, 22 May 2020 11:15:14 +0000 (+1000) Subject: Apply a workaround to ensure the player limit is returned as 2 when duel is selected... X-Git-Tag: xonotic-v0.8.5~1050 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=662b6ae443399b6ca94d538afb51221d58ec9dca;p=xonotic%2Fxonotic-data.pk3dir.git Apply a workaround to ensure the player limit is returned as 2 when duel is selected from the gametype vote screen --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index cb26ccc1f..2f45c06ae 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1955,6 +1955,8 @@ void Join(entity this) int GetPlayerLimit() { + if(g_duel) + return 2; // TODO: this workaround is needed since the mutator hook from duel can't be activated before the gametype is loaded (e.g. switching modes via gametype vote screen) int player_limit = autocvar_g_maxplayers; MUTATOR_CALLHOOK(GetPlayerLimit, player_limit); player_limit = M_ARGV(0, int); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index c626b52f8..bee939d9a 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1106,7 +1106,7 @@ string Map_Filename(float position) void Map_MarkAsRecent(string m) { - cvar_set("g_maplist_mostrecent", strwords(strcat(m, " ", autocvar_g_maplist_mostrecent), max(0, autocvar_g_maplist_mostrecent_count))); + cvar_set("g_maplist_mostrecent", strwords(cons(m, autocvar_g_maplist_mostrecent), max(0, autocvar_g_maplist_mostrecent_count))); } float Map_IsRecent(string m)