From 3b6c0befb181b783303dbf75363bf767072dee42 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 12 Jun 2021 14:02:08 -0700 Subject: [PATCH] Fix being able to start flipped in time trials This fixes a regression where you're able to start flipped by restarting and then holding ACTION. This happens because when the game resets all variables, it turns hascontrol back on (because of hardreset()). However, this is handled in the input function, and it's handled before player input is handled, so the player is able to get 1 frame of being able to flip after a time trial resets. Why didn't this happen in 2.2? Because resetplayer() in 2.2 would set lifeseq to 10, as if the player had died. However, this is inconsistent, because loading in to the game for the first time would not result in a lifeseq of 10. So, in 2.2, restarting the time trial would remove that 1 frame of being able to flip because of lifeseq, while 2.3 doesn't set lifeseq because the player hasn't died. I could have fixed this by setting lifeseq in the time trial restart code, but I decided to just set hascontrol to false instead. Fixes #770. --- desktop_version/src/Input.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 7754045e..7d9ce7fd 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -1950,6 +1950,7 @@ void gameinput(void) script.startgamemode(game.timetriallevel + 3); game.deathseq = -1; game.completestop = false; + game.hascontrol = false; } //Returning to editor mode must always be possible