Fix #12895: Prevent Mechanics from fixing just fixed rides (#13389)

* Fix #12895: only update ride mechanic status when advancing state

* add changelog message

* Change changelog wording

* Bump network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
This commit is contained in:
adam-bloom 2020-11-13 16:13:13 -07:00 committed by GitHub
parent 1f55720bb5
commit d79308ef40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -3,6 +3,7 @@
- Feature: [#13057] Make GameAction flags accessible by plugins. - Feature: [#13057] Make GameAction flags accessible by plugins.
- Feature: [#13376] Open custom window at specified tab. - Feature: [#13376] Open custom window at specified tab.
- Change: [#13346] Change FootpathScenery to FootpathAddition in all occurrences. - Change: [#13346] Change FootpathScenery to FootpathAddition in all occurrences.
- Fix: [#12895] Mechanics are called to repair rides that have already been fixed.
- Fix: [#13334] Uninitialised variables in CustomTabDesc. - Fix: [#13334] Uninitialised variables in CustomTabDesc.
- Fix: [#13342] Rename tabChange to onTabChange in WindowDesc interface. - Fix: [#13342] Rename tabChange to onTabChange in WindowDesc interface.
- Improved: [#12917] Changed peep movement so that they stay more spread out over the full width of single tile paths. - Improved: [#12917] Changed peep movement so that they stay more spread out over the full width of single tile paths.

View File

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

View File

@ -2579,15 +2579,13 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r
{ {
if (!firstRun) if (!firstRun)
{ {
ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;
if (State == PeepState::Inspecting) if (State == PeepState::Inspecting)
{ {
UpdateRideInspected(CurrentRide); UpdateRideInspected(CurrentRide);
StaffRidesInspected++; StaffRidesInspected++;
WindowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST; WindowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST;
ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;
return true; return true;
} }
@ -2610,7 +2608,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r
} }
ride_fix_breakdown(ride, steps); ride_fix_breakdown(ride, steps);
ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;
return true; return true;
} }