]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 cb26ccc1fccc9c08be1bc46a4cf85bcd20842d8a..2f45c06aed9adbab7ebd8d499e1bf4ee3d6e768b 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 c626b52f8f3b1a4d47bb11d48a60bbaeb2cf2635..bee939d9ac55fc5da8766fb70d0510123d1b71f3 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)