1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Fix: Staff patrol areas getting clobbered when hiring new staff (#9271)

Fixed incorrect indexing when resetting staff patrol areas during hiring
process.
This commit is contained in:
James Warwood
2019-05-18 10:43:06 +01:00
committed by Aaron van Geffen
parent 6b232f7e53
commit d7074e65a2
2 changed files with 3 additions and 3 deletions

View File

@@ -260,9 +260,9 @@ private:
gStaffModes[staffIndex] = STAFF_MODE_WALK;
for (int32_t newStaffIndex = 0; newStaffIndex < STAFF_PATROL_AREA_SIZE; newStaffIndex++)
for (int32_t i = 0; i < STAFF_PATROL_AREA_SIZE; i++)
{
gStaffPatrolAreas[newStaffIndex * STAFF_PATROL_AREA_SIZE + newStaffId] = 0;
gStaffPatrolAreas[staffIndex * STAFF_PATROL_AREA_SIZE + i] = 0;
}
res->peepSriteIndex = newPeep->sprite_index;

View File

@@ -33,7 +33,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "31"
#define NETWORK_STREAM_VERSION "32"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;