1
0
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:
ζeh Matt
2025-11-28 16:46:41 +02:00
parent 23da3c6b46
commit 2cc05eb353

View File

@@ -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++;
}