mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Move returning to editor to end of frame
This fixes horizontal and vertical warp backgrounds not resetting, and also a bunch of other 1-frame glitches, most noticeably cutscene bars and fadeouts. This adds a new variable shouldreturntoeditor to Game to signal whether or not it should return to editor at the end of the frame.
This commit is contained in:
parent
51971fa84c
commit
2d07090a6b
4 changed files with 14 additions and 1 deletions
|
@ -375,6 +375,10 @@ void Game::init(void)
|
|||
fadetolab = false;
|
||||
fadetolabdelay = 0;
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
shouldreturntoeditor = false;
|
||||
#endif
|
||||
|
||||
/* Terry's Patrons... */
|
||||
superpatrons.push_back("Anders Ekermo");
|
||||
superpatrons.push_back("Andreas K|mper");
|
||||
|
|
|
@ -388,6 +388,7 @@ public:
|
|||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
void returntoeditor();
|
||||
bool shouldreturntoeditor;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -1537,7 +1537,7 @@ void gameinput()
|
|||
game.activeactivity = -1;
|
||||
}
|
||||
}else{
|
||||
game.returntoeditor();
|
||||
game.shouldreturntoeditor = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1380,4 +1380,12 @@ void gamelogic()
|
|||
|
||||
if (game.teleport_to_new_area)
|
||||
script.teleport();
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (game.shouldreturntoeditor)
|
||||
{
|
||||
game.shouldreturntoeditor = false;
|
||||
game.returntoeditor();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue