mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 10:02:27 +01:00
Remove check if Guest/Staff is deleted, this is handled by EntityList
This commit is contained in:
@@ -211,7 +211,7 @@ void PeepUpdateAll()
|
||||
const auto currentTicksMasked = currentTicks & kTicks128Mask;
|
||||
|
||||
uint32_t index = 0;
|
||||
// Warning this loop can delete peeps
|
||||
|
||||
for (auto peep : EntityList<Guest>())
|
||||
{
|
||||
if ((index & kTicks128Mask) == currentTicksMasked)
|
||||
@@ -219,11 +219,7 @@ void PeepUpdateAll()
|
||||
peep->Tick128UpdateGuest(index);
|
||||
}
|
||||
|
||||
// 128 tick can delete so double check its not deleted
|
||||
if (peep->Type == EntityType::guest)
|
||||
{
|
||||
peep->Update();
|
||||
}
|
||||
peep->Update();
|
||||
|
||||
index++;
|
||||
}
|
||||
@@ -235,11 +231,7 @@ void PeepUpdateAll()
|
||||
staff->Tick128UpdateStaff();
|
||||
}
|
||||
|
||||
// 128 tick can delete so double check its not deleted
|
||||
if (staff->Type == EntityType::staff)
|
||||
{
|
||||
staff->Update();
|
||||
}
|
||||
staff->Update();
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user