mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Reset warp directions when exiting playtesting
This fixes a bug where if warpdir() was used during in-editor playtesting, the changed warp direction would persist even when leaving playtesting. This would be very annoying to correct back every time you playtested and warpdir() was used, so I've added some kludge to store the actual warp direction of each room when entering playtesting, and then set the warp directions back when leaving playtesting.
This commit is contained in:
@@ -1913,6 +1913,14 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
|
||||
|
||||
dwgfx.backgrounddrawn=false;
|
||||
music.fadeout();
|
||||
//If warpdir() is used during playtesting, we need to set it back after!
|
||||
for (int j = 0; j < ed.maxheight; j++)
|
||||
{
|
||||
for (int i = 0; i < ed.maxwidth; i++)
|
||||
{
|
||||
ed.level[i+(j*ed.maxwidth)].warpdir=ed.kludgewarpdir[i+(j*ed.maxwidth)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user