File diff r28656:29f31f80076a → r28657:ee447a88ccab
src/roadveh_cmd.cpp
Show inline comments
 
@@ -387,7 +387,12 @@ CommandCost CmdTurnRoadVeh(DoCommandFlag
 

	
 
	if (IsTileType(v->tile, MP_TUNNELBRIDGE) && DirToDiagDir(v->direction) == GetTunnelBridgeDirection(v->tile)) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) v->reverse_ctr = 180;
 
	if (flags & DC_EXEC) {
 
		v->reverse_ctr = 180;
 

	
 
		/* Unbunching data is no longer valid. */
 
		v->ResetDepotUnbunching();
 
	}
 

	
 
	return CommandCost();
 
}
 
@@ -1030,6 +1035,7 @@ bool RoadVehLeaveDepot(RoadVehicle *v, b
 
		if (RoadVehFindCloseTo(v, x, y, v->direction, false) != nullptr) return true;
 

	
 
		VehicleServiceInDepot(v);
 
		v->LeaveUnbunchingDepot();
 

	
 
		StartRoadVehSound(v);
 

	
 
@@ -1587,7 +1593,11 @@ static bool RoadVehController(RoadVehicl
 

	
 
	if (v->current_order.IsType(OT_LOADING)) return true;
 

	
 
	if (v->IsInDepot() && RoadVehLeaveDepot(v, true)) return true;
 
	if (v->IsInDepot()) {
 
		/* Check if we should wait here for unbunching. */
 
		if (v->IsWaitingForUnbunching()) return true;
 
		if (RoadVehLeaveDepot(v, true)) return true;
 
	}
 

	
 
	v->ShowVisualEffect();