File diff r25561:3defb050f30b → r25562:30716ba6a396
src/roadveh_cmd.cpp
Show inline comments
 
@@ -357,25 +357,25 @@ bool RoadVehicle::FindClosestDepot(TileI
 
	return true;
 
}
 

	
 
/**
 
 * Turn a roadvehicle around.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 vehicle ID to turn
 
 * @param p2 unused
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
 
{
 
	RoadVehicle *v = RoadVehicle::GetIfValid(p1);
 
	if (v == nullptr) return CMD_ERROR;
 

	
 
	if (!v->IsPrimaryVehicle()) return CMD_ERROR;
 

	
 
	CommandCost ret = CheckOwnership(v->owner);
 
	if (ret.Failed()) return ret;
 

	
 
	if ((v->vehstatus & VS_STOPPED) ||
 
			(v->vehstatus & VS_CRASHED) ||
 
			v->breakdown_ctr != 0 ||