]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_welcome.qc
Fix #2689 "Welcome dialog is not closed by voting screens or by disconnecting"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_welcome.qc
index ca80ef4dd780241e2c971810972628fd7a60a979..5da6f8b1ea9a0bb30aba0786c0bba645f59f2d3b 100644 (file)
@@ -71,6 +71,10 @@ void XonoticWelcomeDialog_readInputArgs(entity me, int argsbuf)
 void XonoticWelcomeDialog_draw(entity me)
 {
        SUPER(XonoticWelcomeDialog).draw(me);
+
+       if (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)))
+               me.close(me);
+
        if(me.serverinfo_MOTD == "" && gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
        {
                // if serverinfo_MOTD is empty while connected it means we are connected to an old server