diff --git a/commandline.cpp b/commandline.cpp index 3f1dd4d0..ff4c7a59 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -256,6 +256,7 @@ else if(args()[0] == '-' && args()[1] == x && args()[2] == '0') { PHASEFROM(2); } else if(argis("-canvas")) { PHASEFROM(2); + stop_game(); firstland = specialland = laCanvas; shift(); if(args() == "i") canvas_invisible = !canvas_invisible; diff --git a/config.cpp b/config.cpp index b266b55e..2af11b6f 100644 --- a/config.cpp +++ b/config.cpp @@ -326,6 +326,7 @@ void resetModes(char leave) { vid.scfg.players = 1; stop_game_and_switch_mode(); } if(firstland != laIce || specialland != laIce) { + stop_game(); firstland = laIce; specialland = laIce; stop_game_and_switch_mode(); } diff --git a/menus.cpp b/menus.cpp index 907a8764..45dcf0e7 100644 --- a/menus.cpp +++ b/menus.cpp @@ -769,6 +769,7 @@ void showStartMenu() { resetModes('g'); stampbase = ticks; if(!sphere) { + stop_game(); specialland = laHalloween; targetgeometry = gSphere; restart_game(rg::geometry); diff --git a/pattern2.cpp b/pattern2.cpp index ad19c33f..18dcddf2 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1358,27 +1358,27 @@ namespace patterns { }; dialog::openColorDialog(c, canvasbacks); dialog::reaction = [] () { + stop_game(); whichCanvas = 'g'; canvasback = c >> 8; firstland = specialland = laCanvas; randomPatternsMode = false; - stop_game(); start_game(); }; } else if(uni == 'i') { + stop_game(); canvas_invisible = !canvas_invisible; firstland = specialland = laCanvas; randomPatternsMode = false; - stop_game(); start_game(); } else if((uni >= 'a' && uni <= 'z') || (uni >= 'A' && uni <= 'Z')) { + stop_game(); whichCanvas = uni; subcanvas = rand(); firstland = specialland = laCanvas; randomPatternsMode = false; - stop_game(); start_game(); if(uni == 'x' || uni == 'z' || uni == 't') whichPattern = PAT_ZEBRA, subpattern_flags = SPF_SYM0123 | SPF_ROT; diff --git a/quit.cpp b/quit.cpp index 80096036..91219127 100644 --- a/quit.cpp +++ b/quit.cpp @@ -273,6 +273,7 @@ hint hints[] = { [] () { if(!sphere) { resetModes(); + stop_game(); specialland = laHalloween; targetgeometry = gSphere; restart_game(rg::geometry); diff --git a/rogueviz.cpp b/rogueviz.cpp index 6bda0a46..381e126a 100644 --- a/rogueviz.cpp +++ b/rogueviz.cpp @@ -1469,9 +1469,11 @@ void init() { showstartmenu = false; #if !ISWEB mapeditor::drawplayer = false; + stop_game(); firstland = specialland = laCanvas; restart_game(shmup::on ? rg::shmup : rg::nothing); #else + stop_game(); firstland = specialland = laCanvas; restart_game(rg::nothing); #endif diff --git a/tour.cpp b/tour.cpp index 1780bc60..fdc4b919 100644 --- a/tour.cpp +++ b/tour.cpp @@ -321,6 +321,7 @@ void start() { if(!tour::on) presentation(pmStartAll); else { presentation(pmStop); + stop_game(); firstland = specialland = laIce; } restart_game(rg::tour); diff --git a/yendor.cpp b/yendor.cpp index 5ef36d70..94f7167e 100644 --- a/yendor.cpp +++ b/yendor.cpp @@ -1098,6 +1098,7 @@ namespace peace { if(uni == '1') otherpuzzles = !otherpuzzles; else if(uni >= 'a' && uni < 'a' + qty) { + stop_game(); specialland = levellist[uni - 'a']; restart_game(peace::on ? 0 : rg::peace); }