mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Use .clear() when removing text boxes in reset functions
graphics.textbox.clear() should be used instead of graphics.textboxremove() or graphics.textboxremovefast(), because even with graphics.textboxremovefast(), you'll still have to process at least one frame of GAMEMODE logic before the text boxes are actually properly removed, and this caused a 1-frame glitch when exiting playtesting with text boxes on-screen and then re-entering playtesting. Technically I could've only fixed it in Game::returntoeditor(), but I wanted to be safe, so I also fixed it in scriptclass::hardreset(), too.
This commit is contained in:
@@ -7298,7 +7298,7 @@ void Game::returntoeditor()
|
||||
{
|
||||
game.gamestate = EDITORMODE;
|
||||
|
||||
graphics.textboxremove();
|
||||
graphics.textbox.clear();
|
||||
game.hascontrol = true;
|
||||
game.advancetext = false;
|
||||
game.completestop = false;
|
||||
|
||||
@@ -3648,7 +3648,7 @@ void scriptclass::hardreset()
|
||||
|
||||
//dwgraphicsclass
|
||||
graphics.backgrounddrawn = false;
|
||||
graphics.textboxremovefast();
|
||||
graphics.textbox.clear();
|
||||
graphics.flipmode = false; //This will be reset if needs be elsewhere
|
||||
graphics.showcutscenebars = false;
|
||||
graphics.cutscenebarspos = 0;
|
||||
|
||||
Reference in New Issue
Block a user