Fix timetable state conditional order not initing timetable field

pull/453/head
Jonathan G Rennison 2 years ago
parent cb9c657f59
commit 1ddccee0d7

@ -2122,7 +2122,10 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
break;
case OCV_TIMETABLE:
if (!old_var_was_tt) order->GetXDataRef() = 0;
if (!old_var_was_tt) {
order->SetConditionValue(0);
order->GetXDataRef() = 0;
}
if (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE || occ == OCC_EQUALS || occ == OCC_NOT_EQUALS) order->SetConditionComparator(OCC_LESS_THAN);
break;

Loading…
Cancel
Save