From 662b6ae443399b6ca94d538afb51221d58ec9dca Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 22 May 2020 21:15:14 +1000 Subject: [PATCH] Apply a workaround to ensure the player limit is returned as 2 when duel is selected from the gametype vote screen --- qcsrc/server/client.qc | 2 ++ qcsrc/server/g_world.qc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index cb26ccc1fc..2f45c06aed 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 c626b52f8f..bee939d9ac 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) -- 2.39.2