]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Apply a workaround to ensure the player limit is returned as 2 when duel is selected...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index cb26ccc1fccc9c08be1bc46a4cf85bcd20842d8a..2f45c06aed9adbab7ebd8d499e1bf4ee3d6e768b 100644 (file)
@@ -1955,6 +1955,8 @@ void Join(entity this)
 
 int GetPlayerLimit()
 {
 
 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);
        int player_limit = autocvar_g_maxplayers;
        MUTATOR_CALLHOOK(GetPlayerLimit, player_limit);
        player_limit = M_ARGV(0, int);