From a59e9d51db7347bed4664d88942c81ec07a66ba9 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 2 Sep 2021 12:23:17 -0700 Subject: [PATCH] gamemode(teleporter): Set gamestate to GAMEMODE This makes it so gamemode(teleporter) will always do an animation, even if the game is already in TELEPORTERMODE. I used this script to test: gamemode(teleporter) delay(5) gamemode(teleporter) delay(5) gamemode(teleporter) In 2.2, this script starts the map menu bringing-up animation three times. In previous 2.3, this script starts the map menu bringing-up animation once, but then the next gamemode(teleporter) immediately finishes the animation, and the third gamemode(teleporter) does nothing. This commit restores it to 2.2 behavior. --- desktop_version/src/Script.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index 79007fc7..0889d447 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -1349,6 +1349,7 @@ void scriptclass::run(void) { if (words[1] == "teleporter") { + game.gamestate = GAMEMODE; /* to set prevgamestate */ game.mapmenuchange(TELEPORTERMODE, false); game.useteleporter = false; //good heavens don't actually use it