summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-08 13:32:44 +0000
committerrubidium <rubidium@openttd.org>2008-04-08 13:32:44 +0000
commit4267797cc8f7ee669122c22efeb5a6014644689f (patch)
tree429aa97c65369c027a6dba3ca3df0df712fa285a /src/order_cmd.cpp
parentd577b0504acb87e0d75330ed438cfbe422469e96 (diff)
downloadopenttd-4267797cc8f7ee669122c22efeb5a6014644689f.tar.xz
(svn r12628) -Fix: TTDP compatible non-stop wasn't handled properly.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 8951841df..adabeb4a3 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -43,11 +43,11 @@ DEFINE_OLD_POOL_GENERIC(Order, Order);
OrderNonStopFlags Order::GetNonStopType() const
{
- return (this->flags & 0x8) ?
- ((!_patches.new_nonstop || !this->IsType(OT_GOTO_STATION)) ?
- ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS :
- ONSF_NO_STOP_AT_DESTINATION_STATION) :
- ONSF_STOP_EVERYWHERE;
+ if (_patches.new_nonstop || this->IsType(OT_GOTO_DEPOT)) {
+ return (this->flags & 0x08) ? ONSF_NO_STOP_AT_ANY_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS;
+ }
+
+ return (this->flags & 0x08) ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE;
}
void Order::Free()
@@ -759,7 +759,7 @@ CommandCost CmdModifyOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
order->SetLoadType(OLF_LOAD_IF_POSSIBLE);
break;
case OF_NON_STOP:
- order->SetNonStopType(order->GetNonStopType() == ONSF_STOP_EVERYWHERE ? ONSF_NO_STOP_AT_ANY_STATION : ONSF_STOP_EVERYWHERE);
+ order->SetNonStopType((order->GetNonStopType() == (_patches.new_nonstop ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE)) ? ONSF_NO_STOP_AT_ANY_STATION : ONSF_STOP_EVERYWHERE);
break;
case OF_TRANSFER:
order->SetUnloadType((OrderUnloadFlags)(order->GetUnloadType() ^ OUFB_TRANSFER));