Changeset - r8861:c17c322e4ef3
[Not reviewed]
master
0 2 0
rubidium - 16 years ago 2008-04-08 13:32:44
rubidium@openttd.org
(svn r12628) -Fix: TTDP compatible non-stop wasn't handled properly.
2 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/order_cmd.cpp
Show inline comments
 
@@ -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 til
 
				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));
src/order_gui.cpp
Show inline comments
 
@@ -201,7 +201,7 @@ static void DrawOrdersWindow(Window *w)
 
					break;
 

	
 
				case OT_GOTO_STATION:
 
					SetDParam(1, _station_order_strings[!!order->GetNonStopType()][order->GetLoadType() | order->GetUnloadType()]);
 
					SetDParam(1, _station_order_strings[!(order->GetNonStopType() == (_patches.new_nonstop ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE))][order->GetLoadType() | order->GetUnloadType()]);
 
					SetDParam(2, order->GetDestination());
 
					break;
 

	
0 comments (0 inline, 0 general)