File diff r26089:2283e9229bb0 → r26090:5a592dbf1c28
src/vehicle.cpp
Show inline comments
 
@@ -307,7 +307,7 @@ void ShowNewGrfVehicleError(EngineID eng
 
		SetDParamStr(0, grfconfig->GetName());
 
		SetDParam(1, engine);
 
		ShowErrorMessage(part1, part2, WL_CRITICAL);
 
		if (!_networking) DoCommand(0, critical ? PM_PAUSED_ERROR : PM_PAUSED_NORMAL, 1, DC_EXEC, CMD_PAUSE);
 
		if (!_networking) DoCommand(DC_EXEC, CMD_PAUSE, 0, critical ? PM_PAUSED_ERROR : PM_PAUSED_NORMAL, 1);
 
	}
 

	
 
	/* debug output */
 
@@ -1055,7 +1055,7 @@ void CallVehicleTicks()
 

	
 
		const Company *c = Company::Get(_current_company);
 
		SubtractMoneyFromCompany(CommandCost(EXPENSES_NEW_VEHICLES, (Money)c->settings.engine_renew_money));
 
		CommandCost res = DoCommand(0, v->index, 0, DC_EXEC, CMD_AUTOREPLACE_VEHICLE);
 
		CommandCost res = DoCommand(DC_EXEC, CMD_AUTOREPLACE_VEHICLE, 0, v->index, 0);
 
		SubtractMoneyFromCompany(CommandCost(EXPENSES_NEW_VEHICLES, -(Money)c->settings.engine_renew_money));
 

	
 
		if (!IsLocalCompany()) continue;
 
@@ -1561,7 +1561,7 @@ void VehicleEnterDepot(Vehicle *v)
 

	
 
		if (v->current_order.IsRefit()) {
 
			Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
 
			CommandCost cost = DoCommand(v->tile, v->index, v->current_order.GetRefitCargo() | 0xFF << 8, DC_EXEC, GetCmdRefitVeh(v));
 
			CommandCost cost = DoCommand(DC_EXEC, GetCmdRefitVeh(v), v->tile, v->index, v->current_order.GetRefitCargo() | 0xFF << 8);
 
			cur_company.Restore();
 

	
 
			if (cost.Failed()) {
 
@@ -2443,7 +2443,7 @@ CommandCost Vehicle::SendToDepot(DoComma
 

	
 
		/* If there is no depot in front and the train is not already reversing, reverse automatically (trains only) */
 
		if (this->type == VEH_TRAIN && (reverse ^ HasBit(Train::From(this)->flags, VRF_REVERSING))) {
 
			DoCommand(this->tile, this->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);
 
			DoCommand(DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION, this->tile, this->index, 0);
 
		}
 

	
 
		if (this->type == VEH_AIRCRAFT) {