Skip to content

Commit

Permalink
only update ride mechanic status when advancing state
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-bloom committed Nov 7, 2020
1 parent b8f56fd commit 256cca1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/openrct2/peep/Staff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2579,15 +2579,14 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r
{
if (!firstRun)
{
ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;

if (State == PeepState::Inspecting)
{
UpdateRideInspected(CurrentRide);

StaffRidesInspected++;
WindowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST;

ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;
return true;
}

Expand All @@ -2610,7 +2609,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r
}

ride_fix_breakdown(ride, steps);

ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;
return true;
}

Expand Down

0 comments on commit 256cca1

Please sign in to comment.