Fix conditional order subtype not being reset when changing to time/date

This commit is contained in:
Jonathan G Rennison 2023-09-23 16:41:38 +01:00
parent 81c66f79aa
commit 9ad2f44ab7

View File

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