1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

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.
This commit is contained in:
Misa 2021-06-12 14:02:08 -07:00 committed by Ethan Lee
parent 1d66cfccab
commit 3b6c0befb1

View File

@ -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