Fix conditional order subtype not being reset when changing to time/date
This commit is contained in:
@@ -2224,7 +2224,10 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OCV_TIME_DATE:
|
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);
|
if (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) order->SetConditionComparator(OCC_EQUALS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user