Fix timetable state conditional order not initing timetable field

This commit is contained in:
Jonathan G Rennison
2022-11-17 20:55:11 +00:00
parent cb9c657f59
commit 1ddccee0d7

View File

@@ -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;