Fix compatibility with levels that rely on gamestate-based script boxes

Some levels rely specifically on the fact that certain script boxes are
loaded using gamestates, instead of directly loading the script and
bypassing the gamestate system. Then weird things could happen. This
restores compatibility with those levels.

mapclass::twoframedelayfix() doesn't need to be updated because the
point of that function is to bypass the gamestate system entirely
anyways.
This commit is contained in:
Misa authored and Ethan Lee committed 2020-08-17 15:14:22 -04:00
1 parent fb6635abec
commit 77b47a3c7e
1 file changed
+2 -1
+2 -1
View File
@@ -4828,7 +4828,8 @@ void entityclass::entitycollisioncheck()
int block_idx = -1;
if (checktrigger(&block_idx) > -1 && block_idx > -1)
{
if (blocks[block_idx].script != "")
// Load the block's script if its gamestate is out of range
if (blocks[block_idx].script != "" && (activetrigger < 300 || activetrigger > 336))
{
game.startscript = true;
game.newscript = blocks[block_idx].script;