1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 10:45:16 +01:00

Use more specific types where appropriate (#14388)

It takes marginally more time to get a Peep than a Guest/Staff so may as well go straight to the correct type
This commit is contained in:
Duncan
2021-03-25 08:44:25 +00:00
committed by GitHub
parent 1be7457e30
commit 0a47d2157a
7 changed files with 44 additions and 54 deletions

View File

@@ -1421,7 +1421,7 @@ rct_window* window_ride_open_vehicle(Vehicle* vehicle)
int32_t numPeepsLeft = vehicle->num_peeps;
for (int32_t i = 0; i < 32 && numPeepsLeft > 0; i++)
{
Peep* peep = GetEntity<Peep>(vehicle->peep[i]);
Peep* peep = GetEntity<Guest>(vehicle->peep[i]);
if (peep == nullptr)
continue;