1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-15 12:02:34 +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; const auto currentTicksMasked = currentTicks & kTicks128Mask;
uint32_t index = 0; uint32_t index = 0;
// Warning this loop can delete peeps
for (auto peep : EntityList<Guest>()) for (auto peep : EntityList<Guest>())
{ {
if ((index & kTicks128Mask) == currentTicksMasked) if ((index & kTicks128Mask) == currentTicksMasked)
@@ -219,11 +219,7 @@ void PeepUpdateAll()
peep->Tick128UpdateGuest(index); peep->Tick128UpdateGuest(index);
} }
// 128 tick can delete so double check its not deleted peep->Update();
if (peep->Type == EntityType::guest)
{
peep->Update();
}
index++; index++;
} }
@@ -235,11 +231,7 @@ void PeepUpdateAll()
staff->Tick128UpdateStaff(); staff->Tick128UpdateStaff();
} }
// 128 tick can delete so double check its not deleted staff->Update();
if (staff->Type == EntityType::staff)
{
staff->Update();
}
index++; index++;
} }