mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-27 17:41:49 +03:00
Fix double script execution when entering playtesting
`twoframedelayfix()` now gets called in `resetplayer` due to #1258, to fix the two-frame script delay when you respawn. Unfortunately, there seems to be some strange bug where starting playtesting in a script box activates the script twice. While I'm not exactly sure WHY this happens logic-wise, we can quickly squash this issue by checking if the player is reset due to dying.
This commit is contained in:
@@ -791,7 +791,10 @@ void mapclass::resetplayer(const bool player_died)
|
||||
if (game.roomx != game.saverx || game.roomy != game.savery)
|
||||
{
|
||||
gotoroom(game.saverx, game.savery);
|
||||
twoframedelayfix();
|
||||
if (player_died)
|
||||
{
|
||||
twoframedelayfix();
|
||||
}
|
||||
}
|
||||
|
||||
int i = obj.getplayer();
|
||||
|
||||
Reference in New Issue
Block a user