mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-27 17:41:49 +03:00
Fix two-frame script delay when respawning
At some point, there was some "kludge" added to the game which allowed script boxes to immediately get triggered when you enter a room, rather than the update order unfortunately causing scripts to trigger after two frames. For some reason, dying and respawning in a room does not have the same fix, causing really bad inconsistencies for anything that needs precise timing. Despite the initial implementation of the kludge being somewhat careless and breaking levels which relied on timing, this one should not break anything, but in fact fix things, surprisingly.
This commit is contained in:
@@ -785,12 +785,15 @@ void mapclass::resetplayer(void)
|
||||
void mapclass::resetplayer(const bool player_died)
|
||||
{
|
||||
bool was_in_tower = towermode;
|
||||
|
||||
game.deathseq = -1;
|
||||
|
||||
if (game.roomx != game.saverx || game.roomy != game.savery)
|
||||
{
|
||||
gotoroom(game.saverx, game.savery);
|
||||
twoframedelayfix();
|
||||
}
|
||||
|
||||
game.deathseq = -1;
|
||||
int i = obj.getplayer();
|
||||
if(INBOUNDS_VEC(i, obj.entities))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user