mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +01: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:
parent
a38faad156
commit
c8f000af02
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue