Changeset - r13984:7df201134bec
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2009-12-19 15:31:23
rubidium@openttd.org
(svn r18536) -Fix [FS#3386]: MSVC warning. Patch by pavel1269
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1549,25 +1549,25 @@ void Vehicle::HandleLoading(bool mode)
 
	}
 

	
 
	this->IncrementOrderIndex();
 
}
 

	
 
CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command)
 
{
 
	if (!CheckOwnership(this->owner)) return CMD_ERROR;
 
	if (this->vehstatus & VS_CRASHED) return CMD_ERROR;
 
	if (this->IsStoppedInDepot()) return CMD_ERROR;
 

	
 
	if (this->current_order.IsType(OT_GOTO_DEPOT)) {
 
		bool halt_in_depot = this->current_order.GetDepotActionType() & ODATFB_HALT;
 
		bool halt_in_depot = (this->current_order.GetDepotActionType() & ODATFB_HALT) != 0;
 
		if (!!(command & DEPOT_SERVICE) == halt_in_depot) {
 
			/* We called with a different DEPOT_SERVICE setting.
 
			 * Now we change the setting to apply the new one and let the vehicle head for the same depot.
 
			 * Note: the if is (true for requesting service == true for ordered to stop in depot)          */
 
			if (flags & DC_EXEC) {
 
				this->current_order.SetDepotOrderType(ODTF_MANUAL);
 
				this->current_order.SetDepotActionType(halt_in_depot ? ODATF_SERVICE_ONLY : ODATFB_HALT);
 
				SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, VVW_WIDGET_START_STOP_VEH);
 
			}
 
			return CommandCost();
 
		}
 

	
0 comments (0 inline, 0 general)