1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

Don't use bounds check for result of checktrigger(), it's a gamestate

checktrigger() returns a gamestate number, not the index of an entity.

Whoops.
This commit is contained in:
Misa 2020-09-25 14:57:59 -07:00 committed by Ethan Lee
parent a38faad156
commit c8f000af02

View File

@ -4650,7 +4650,7 @@ void entityclass::entitycollisioncheck()
// WARNING: If updating this code, don't forget to update Map.cpp mapclass::twoframedelayfix()
activetrigger = -1;
int block_idx = -1;
if (INBOUNDS_VEC(checktrigger(&block_idx), entities) && INBOUNDS_VEC(block_idx, blocks))
if (checktrigger(&block_idx) > -1 && INBOUNDS_VEC(block_idx, blocks))
{
// Load the block's script if its gamestate is out of range
if (blocks[block_idx].script != "" && (activetrigger < 300 || activetrigger > 336))