From 2cc05eb353f86cab46da084658cc7616ca920a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Fri, 28 Nov 2025 16:46:41 +0200 Subject: [PATCH] Remove check if Guest/Staff is deleted, this is handled by EntityList --- src/openrct2/entity/Peep.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 4b34e64383..603aee0819 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -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()) { 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++; }