diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 724c17d2..41826bcf 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -1996,7 +1996,10 @@ void mapinput() void mapmenuactionpress() { - if (game.menupage == 1 && obj.flags[67] && !game.insecretlab && !map.custommode) + switch (game.menupage) + { + case 1: + if (obj.flags[67] && !game.insecretlab && !map.custommode) { //Warp back to the ship graphics.resumegamemode = true; @@ -2019,8 +2022,9 @@ void mapmenuactionpress() game.state = 4000; game.statedelay = 0; } - - if (game.menupage == 3 && !game.gamesaved && !game.intimetrial + break; + case 3: + if (!game.gamesaved && !game.intimetrial && !game.nodeathmode && !game.insecretlab && !game.inintermission) { game.flashlight = 5; @@ -2045,14 +2049,13 @@ void mapmenuactionpress() game.savequick(); } } + break; - if (game.menupage == 10) - { + case 10: //return to game graphics.resumegamemode = true; - } - if (game.menupage == 11) - { + break; + case 11: //quit to menu //Kill contents of offset render buffer, since we do that for some reason. @@ -2063,21 +2066,20 @@ void mapmenuactionpress() map.nexttowercolour(); game.fadetomenu = true; game.fadetomenudelay = 16; - } + break; - if (game.menupage == 20) - { + case 20: //return to game graphics.resumegamemode = true; - } - if (game.menupage == 21) - { + break; + case 21: //quit to menu game.swnmode = false; graphics.fademode = 2; music.fadeout(); game.fadetolab = true; game.fadetolabdelay = 16; + break; } }