mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #992 from duncanspumpkin/fix_mechanics
Fix mechanics prioritising inspecting over fixing
This commit is contained in:
commit
69b563af95
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue