1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-15 09:08:29 +02:00

Reset game.activeactivity and game.act_fade in scriptclass::hardreset()

Resetting game.activeactivity fixes triggering Undefined Behavior if you
quit to the menu while standing inside an activity zone, and then
re-entered the game. Resetting game.act_fade also fixes the activity
zone prompt fadeout that happens once the above segfault is fixed.

Don't worry, other activity-zone like variables such as teleporter
prompts and trophy text are already covered. obj.trophytext is reset in
scriptclass::hardreset(), too, and game.readytotele is reset every time
mapclass::gotoroom() is called, and mapclass::gotoroom() is called every
time a gamemode is started.
This commit is contained in:
Misa 2020-05-19 21:32:53 -07:00 committed by Ethan Lee
parent a10265787d
commit b5a009f2e2

View File

@ -3503,6 +3503,9 @@ void scriptclass::hardreset()
game.flashlight = 0;
game.screenshake = 0;
game.activeactivity = -1;
game.act_fade = 5;
//dwgraphicsclass
graphics.backgrounddrawn = false;
graphics.textboxremovefast();