Apply a workaround to ensure the player limit is returned as 2 when duel is selected...
authorMario <mario.mario@y7mail.com>
Fri, 22 May 2020 11:15:14 +0000 (21:15 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 22 May 2020 11:15:14 +0000 (21:15 +1000)
qcsrc/server/client.qc
qcsrc/server/g_world.qc

index cb26ccc..2f45c06 100644 (file)
@@ -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);
index c626b52..bee939d 100644 (file)
@@ -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)