mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fix random crash
This commit is contained in:
parent
e48fab19da
commit
6172cba7f3
1 changed files with 3 additions and 4 deletions
|
@ -893,7 +893,7 @@ void UpdateAllItems()
|
|||
auto prevPose = item->Pose;
|
||||
|
||||
if (Objects[item->ObjectNumber].control != nullptr)
|
||||
Objects[item->ObjectNumber].control(itemNumber);
|
||||
Objects[item->ObjectNumber].control(item->Index);
|
||||
|
||||
// Update bridge.
|
||||
if (item->IsBridge() && item->Pose != prevPose)
|
||||
|
@ -902,7 +902,7 @@ void UpdateAllItems()
|
|||
bridge.Update(*item);
|
||||
}
|
||||
|
||||
TestVolumes(itemNumber);
|
||||
TestVolumes(item->Index);
|
||||
ProcessEffects(item);
|
||||
|
||||
if (item->AfterDeath > 0 && item->AfterDeath < ITEM_DEATH_TIMEOUT && !(Wibble & 3))
|
||||
|
@ -912,9 +912,8 @@ void UpdateAllItems()
|
|||
}
|
||||
else
|
||||
{
|
||||
KillItem(itemNumber);
|
||||
KillItem(item->Index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
InItemControlLoop = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue