From f9ae3dd9801bedbae5fc3dee396c1bab3f67e86e Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sat, 18 Apr 2020 10:34:41 +0100 Subject: [PATCH] Make review changes --- src/openrct2/actions/SetCheatAction.hpp | 4 +--- src/openrct2/peep/Peep.cpp | 2 -- src/openrct2/peep/Staff.cpp | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/openrct2/actions/SetCheatAction.hpp b/src/openrct2/actions/SetCheatAction.hpp index 4965b37c68..a3038fa3a5 100644 --- a/src/openrct2/actions/SetCheatAction.hpp +++ b/src/openrct2/actions/SetCheatAction.hpp @@ -686,9 +686,7 @@ private: } Peep* peep; - uint16_t sprite_index; - - FOR_ALL_GUESTS (sprite_index, peep) + FOR_ALL_GUESTS (spriteIndex, peep) { peep->Remove(); } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 26c1c304a8..f968a7285f 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -412,8 +412,6 @@ void peep_update_all() return; FOR_ALL_PEEPS (spriteIndex, peep) { - peep = &(get_sprite(spriteIndex)->peep); - if ((uint32_t)(i & 0x7F) != (gCurrentTicks & 0x7F)) { peep->Update(); diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index f9ddab18f6..2b24a1c1f2 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -155,9 +155,7 @@ void staff_update_greyed_patrol_areas() FOR_ALL_STAFF (sprite_index, peep) { - peep = GET_PEEP(sprite_index); - - if (peep->type == PEEP_TYPE_STAFF && staff_type == peep->staff_type) + if (peep->staff_type == staff_type) { int32_t peepPatrolOffset = peep->staff_id * STAFF_PATROL_AREA_SIZE; for (int32_t i = 0; i < STAFF_PATROL_AREA_SIZE; i++)