Add train is in slot conditional order

This commit is contained in:
Jonathan G Rennison
2018-11-05 04:21:08 +00:00
parent c632539bb7
commit 83a063f51c
6 changed files with 51 additions and 6 deletions

View File

@@ -1736,7 +1736,9 @@ void TraceRestrictRemoveSlotID(TraceRestrictSlotID index)
bool changed_order = false;
Order *o;
FOR_ALL_ORDERS(o) {
if (o->IsType(OT_CONDITIONAL) && o->GetConditionVariable() == OCV_SLOT_OCCUPANCY && o->GetXData() == index) {
if (o->IsType(OT_CONDITIONAL) &&
(o->GetConditionVariable() == OCV_SLOT_OCCUPANCY || o->GetConditionVariable() == OCV_TRAIN_IN_SLOT) &&
o->GetXData() == index) {
o->GetXDataRef() = INVALID_TRACE_RESTRICT_SLOT_ID;
changed_order = true;
}