Import auto timetable separation patch
http://www.tt-forums.net/viewtopic.php?p=1140899#p1140899
This commit is contained in:
committed by
Jonathan G Rennison
parent
59db260e63
commit
80deb3c01d
@@ -1160,6 +1160,9 @@ CommandCost CmdSkipToOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
v->UpdateRealOrderIndex();
|
||||
|
||||
InvalidateVehicleOrder(v, VIWD_MODIFY_ORDERS);
|
||||
|
||||
if (_settings_game.order.timetable_separation) v->ClearSeparation();
|
||||
if (_settings_game.order.timetable_separation) ClrBit(v->vehicle_flags, VF_TIMETABLE_STARTED);
|
||||
}
|
||||
|
||||
/* We have an aircraft/ship, they have a mini-schedule, so update them all */
|
||||
@@ -1617,9 +1620,18 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
/* Link this vehicle in the shared-list */
|
||||
dst->AddToShared(src);
|
||||
|
||||
|
||||
/* Set automation bit if target has it. */
|
||||
if (HasBit(src->vehicle_flags, VF_AUTOMATE_TIMETABLE))
|
||||
SetBit(dst->vehicle_flags, VF_AUTOMATE_TIMETABLE);
|
||||
|
||||
if (_settings_game.order.timetable_separation) dst->ClearSeparation();
|
||||
if (_settings_game.order.timetable_separation) ClrBit(dst->vehicle_flags, VF_TIMETABLE_STARTED);
|
||||
|
||||
InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
|
||||
InvalidateVehicleOrder(src, VIWD_MODIFY_ORDERS);
|
||||
|
||||
|
||||
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user