diff --git a/src/peep/staff.h b/src/peep/staff.h index 6db3861dbd..18dff988dc 100644 --- a/src/peep/staff.h +++ b/src/peep/staff.h @@ -44,7 +44,9 @@ enum STAFF_ORDERS{ STAFF_ORDERS_SWEEPING = (1 << 0), STAFF_ORDERS_WATER_FLOWERS = (1 << 1), STAFF_ORDERS_EMPTY_BINS = (1 << 2), - STAFF_ORDERS_MOWING = (1 << 3) + STAFF_ORDERS_MOWING = (1 << 3), + STAFF_ORDERS_INSPECT_RIDES = (1 << 0), + STAFF_ORDERS_FIX_RIDES = (1 << 1) }; void game_command_update_staff_colour(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp); diff --git a/src/ride/ride.c b/src/ride/ride.c index 86a79ba78c..a1d0b597a7 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -1714,14 +1714,18 @@ rct_peep *find_closest_mechanic(int x, int y, int forInspection) if (peep->staff_type != STAFF_TYPE_MECHANIC) continue; - if (forInspection) { - if ((peep->state == PEEP_STATE_HEADING_TO_INSPECTION && peep->sub_state >= 4) && peep->state != PEEP_STATE_PATROLLING) + if (!forInspection) { + if (peep->state == PEEP_STATE_HEADING_TO_INSPECTION){ + if (peep->sub_state >= 4) + continue; + } + else if (peep->state != PEEP_STATE_PATROLLING) continue; - if (!(peep->staff_orders & 2)) + if (!(peep->staff_orders & STAFF_ORDERS_FIX_RIDES)) continue; } else { - if (peep->state != PEEP_STATE_PATROLLING || !(peep->staff_orders & 1)) + if (peep->state != PEEP_STATE_PATROLLING || !(peep->staff_orders & STAFF_ORDERS_INSPECT_RIDES)) continue; }