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,8 +791,11 @@ void mapclass::resetplayer(const bool player_died)
|
|||||||
if (game.roomx != game.saverx || game.roomy != game.savery)
|
if (game.roomx != game.saverx || game.roomy != game.savery)
|
||||||
{
|
{
|
||||||
gotoroom(game.saverx, game.savery);
|
gotoroom(game.saverx, game.savery);
|
||||||
|
if (player_died)
|
||||||
|
{
|
||||||
twoframedelayfix();
|
twoframedelayfix();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int i = obj.getplayer();
|
int i = obj.getplayer();
|
||||||
if(INBOUNDS_VEC(i, obj.entities))
|
if(INBOUNDS_VEC(i, obj.entities))
|
||||||
|
|||||||
Reference in New Issue
Block a user