From d7074e65a2cb25cf6d941e1ed9530f5aeb093217 Mon Sep 17 00:00:00 2001 From: James Warwood Date: Sat, 18 May 2019 10:43:06 +0100 Subject: [PATCH] Fix: Staff patrol areas getting clobbered when hiring new staff (#9271) Fixed incorrect indexing when resetting staff patrol areas during hiring process. --- src/openrct2/actions/StaffHireNewAction.hpp | 4 ++-- src/openrct2/network/Network.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index 4f27efc5aa..bf29df5300 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -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; diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index da10395c96..dd48e71827 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -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;