diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 247f8a6f96..88c1f2f5a5 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -3864,87 +3864,6 @@ void pathfind_logging_disable() } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 -void peep_autoposition(rct_peep * newPeep) -{ - // Find a location to place new staff member - - newPeep->state = PEEP_STATE_FALLING; - - sint16 x, y, z; - uint32 count = 0; - uint16 sprite_index; - rct_peep * guest = nullptr; - - // Count number of walking guests - FOR_ALL_GUESTS(sprite_index, guest) - { - if (guest->state == PEEP_STATE_WALKING) - ++count; - } - - if (count > 0) - { - // Place staff at a random guest - uint32 rand = scenario_rand_max(count); - FOR_ALL_GUESTS(sprite_index, guest) - { - if (guest->state == PEEP_STATE_WALKING) - { - if (rand == 0) - break; - --rand; - } - } - - x = guest->x; - y = guest->y; - z = guest->z; - } - else - { - // No walking guests; pick random park entrance - count = 0; - uint8 i; - for (i = 0; i < MAX_PARK_ENTRANCES; ++i) - { - if (gParkEntrances[i].x != LOCATION_NULL) - ++count; - } - - if (count > 0) - { - uint32 rand = scenario_rand_max(count); - for (i = 0; i < MAX_PARK_ENTRANCES; ++i) - { - if (gParkEntrances[i].x != LOCATION_NULL) - { - if (rand == 0) - break; - --rand; - } - } - - uint8 dir = gParkEntrances[i].direction; - x = gParkEntrances[i].x; - y = gParkEntrances[i].y; - z = gParkEntrances[i].z; - x += 16 + ((dir & 1) == 0 ? ((dir & 2) ? 32 : -32) : 0); - y += 16 + ((dir & 1) == 1 ? ((dir & 2) ? -32 : 32) : 0); - } - else - { - // No more options; user must pick a location - newPeep->state = PEEP_STATE_PICKED; - x = newPeep->x; - y = newPeep->y; - z = newPeep->z; - } - } - - sprite_move(x, y, z + 16, (rct_sprite *)newPeep); - invalidate_sprite_2((rct_sprite *)newPeep); -} - void increment_guests_in_park() { if (gNumGuestsInPark < UINT16_MAX) diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index da781a84d5..0b6645c571 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -337,7 +337,7 @@ enum PEEP_ACTION_SPRITE_TYPE PEEP_ACTION_SPRITE_TYPE_WITHDRAW_MONEY = 36 }; -enum PEEP_FLAGS +enum PEEP_FLAGS : uint32 { PEEP_FLAGS_LEAVING_PARK = (1 << 0), PEEP_FLAGS_SLOW_WALK = (1 << 1), @@ -990,8 +990,6 @@ void pathfind_logging_enable(rct_peep * peep); void pathfind_logging_disable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 -void peep_autoposition(rct_peep * newPeep); - void increment_guests_in_park(); void increment_guests_heading_for_park(); void decrement_guests_in_park(); diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index b592ad3f09..6f5747ec55 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -525,8 +525,8 @@ void game_command_fire_staff_member(sint32 * eax, sint32 * ebx, sint32 * ecx, si } /** - * Hires a new staff member of the given type. If the hire cannot be completed (eg. the maximum - * number of staff is reached or there are too many people in the game) it returns 0xFFFF. + * Hires a new staff member of the given type. If the hire cannot be completed (eg. the maximum number of staff is reached or + * there are too many peeps) it returns SPRITE_INDEX_NULL. */ uint16 hire_new_staff_member(uint8 staffType) {