mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
fixed several instances when PTM score would not be recorded when changing modes
This commit is contained in:
parent
332bae84de
commit
c9f5b1e048
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -769,6 +769,7 @@ void showStartMenu() {
|
||||
resetModes('g');
|
||||
stampbase = ticks;
|
||||
if(!sphere) {
|
||||
stop_game();
|
||||
specialland = laHalloween;
|
||||
targetgeometry = gSphere;
|
||||
restart_game(rg::geometry);
|
||||
|
@ -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;
|
||||
|
1
quit.cpp
1
quit.cpp
@ -273,6 +273,7 @@ hint hints[] = {
|
||||
[] () {
|
||||
if(!sphere) {
|
||||
resetModes();
|
||||
stop_game();
|
||||
specialland = laHalloween;
|
||||
targetgeometry = gSphere;
|
||||
restart_game(rg::geometry);
|
||||
|
@ -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
|
||||
|
1
tour.cpp
1
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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user