summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-02-25 14:09:58 +0000
committersmatz <smatz@openttd.org>2010-02-25 14:09:58 +0000
commit1ad5e1cece4b14d43d3e2600f87c17a11d25c808 (patch)
tree82882e473df08ded4e2720e7c828cf2c06188c58 /src/ai
parent77214378caf61915bc81580311643c124c4d2696 (diff)
downloadopenttd-1ad5e1cece4b14d43d3e2600f87c17a11d25c808.tar.xz
(svn r19249) -Fix [FS#3642](r18803): start and end tiles were swapped in CMD_REMOVE_LONG_ROAD
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_road.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_road.cpp b/src/ai/api/ai_road.cpp
index b9ffc68be..b03efd8c9 100644
--- a/src/ai/api/ai_road.cpp
+++ b/src/ai/api/ai_road.cpp
@@ -550,7 +550,7 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
EnforcePrecondition(false, ::TileX(start) == ::TileX(end) || ::TileY(start) == ::TileY(end));
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
- return AIObject::DoCommand(end, start, (::TileY(start) != ::TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
+ return AIObject::DoCommand(start, end, (::TileY(start) != ::TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
}
/* static */ bool AIRoad::RemoveRoadFull(TileIndex start, TileIndex end)
@@ -560,7 +560,7 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
EnforcePrecondition(false, ::TileX(start) == ::TileX(end) || ::TileY(start) == ::TileY(end));
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
- return AIObject::DoCommand(end, start, (::TileY(start) != ::TileY(end) ? 4 : 0) | (start < end ? 2 : 1) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
+ return AIObject::DoCommand(start, end, (::TileY(start) != ::TileY(end) ? 4 : 0) | (start < end ? 2 : 1) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
}
/* static */ bool AIRoad::RemoveRoadDepot(TileIndex tile)