diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index 4ff66df9dd..32b37fa512 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -263,10 +263,8 @@ static bool award_is_deserved_best_staff(int32_t activeAwardTypes) if (activeAwardTypes & EnumToFlag(ParkAward::MostUntidy)) return false; - auto staff = EntityList(); - auto staffCount = std::distance(staff.begin(), staff.end()); - auto guests = EntityList(); - auto peepCount = std::distance(guests.begin(), guests.end()); + auto staffCount = GetEntityListCount(EntityType::Staff); + auto peepCount = GetEntityListCount(EntityType::Guest); return ((staffCount != 0) && staffCount >= 20 && staffCount >= peepCount / 32); } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 5c73b231ae..d421b4a308 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -384,10 +384,7 @@ Peep* try_get_guest(uint16_t spriteIndex) int32_t peep_get_staff_count() { - auto list = EntityList(); - auto count = std::distance(list.begin(), list.end()); - - return count; + return GetEntityListCount(EntityType::Staff); } /**