]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Toggle menu off when already connected when pressing hud setup.
authorSahil Singhal <sahil@sahil-desktop.(none)>
Wed, 9 Jun 2010 23:55:30 +0000 (19:55 -0400)
committerSahil Singhal <sahil@sahil-desktop.(none)>
Wed, 9 Jun 2010 23:55:30 +0000 (19:55 -0400)
qcsrc/menu/xonotic/dialog_hudsetup_exit.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c

index 968596c7ea85f727aab34d1b7cd45998d9334abb..f5af5e21c99bfd1b37eb6ad22be85e7998938dcb 100644 (file)
@@ -16,6 +16,6 @@ void fillXonoticHUDExitDialog(entity me)
 {
        entity e;
        me.TR(me);
-               me.TD(me, 2, 1, makeXonoticCommandButton("Exit Setup", '1 0.5 0.5', "_hud_configure 0", 1));
+               me.TD(me, 2, 1, makeXonoticCommandButton("Exit Setup", '1 1 1', "_hud_configure 0", 1));
 }
 #endif
index 2cfb27262445168c557281580ae10e7bc92d08cf..9fce67b5e432067b93d2d870d4cd7d94e768a429 100644 (file)
@@ -189,41 +189,9 @@ void HUDSetup_Join_Click(entity me, entity btn)
        if(! (gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
        {
                localcmd("map hudsetup", "\n");
-               /*float glob, i, n, fh;
-               string s;
-               glob = search_begin("maps/*.instantaction", TRUE, TRUE);
-               if(glob < 0)
-                       return;
-               i = ceil(random() * search_getsize(glob)) - 1;
-               fh = fopen(search_getfilename(glob, i), FILE_READ);
-               search_end(glob);
-               if(fh < 0)
-                       return;
-               while((s = fgets(fh)))
-               {
-                       if(substring(s, 0, 4) == "set ")
-                               s = substring(s, 4, strlen(s) - 4);
-                       n = tokenize_console(s);
-                       if(argv(0) == "bot_number")
-                               cvar_set("bot_number", argv(1));
-                       else if(argv(0) == "skill")
-                               cvar_set("skill", argv(1));
-                       else if(argv(0) == "timelimit")
-                               cvar_set("timelimit_override", argv(1));
-                       else if(argv(0) == "fraglimit")
-                               cvar_set("fraglimit_override", argv(1));
-                       else if(argv(0) == "changelevel")
-                       {
-                               fclose(fh);
-                               localcmd("\nmenu_loadmap_prepare\n");
-                               MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
-                               MapInfo_LoadMap(argv(1));
-                               cvar_set("lastlevel", "1");
-                               return;
-                       }
-               }
-               fclose(fh);*/
        }
+       else
+               localcmd("togglemenu\n");
        localcmd("_hud_configure 1", "\n");
 }
 #endif