summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-30 22:05:57 +0000
committerrubidium <rubidium@openttd.org>2009-07-30 22:05:57 +0000
commit45c9a747db37ef134a4681da8d0a6064e8fbf677 (patch)
tree3571ddb7e076365d11e350ac44b35e79f80b1911
parent5bbf83ebbe149b6fafb1e714ee6d0541a6f6e547 (diff)
downloadopenttd-45c9a747db37ef134a4681da8d0a6064e8fbf677.tar.xz
(svn r16999) -Fix (r16993): AIs couldn't build waypoints anymore
-rw-r--r--src/ai/api/ai_rail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp
index 1579dc165..e84eb0d51 100644
--- a/src/ai/api/ai_rail.cpp
+++ b/src/ai/api/ai_rail.cpp
@@ -177,7 +177,7 @@
EnforcePrecondition(false, GetRailTracks(tile) == RAILTRACK_NE_SW || GetRailTracks(tile) == RAILTRACK_NW_SE);
EnforcePrecondition(false, IsRailTypeAvailable(GetCurrentRailType()));
- return AIObject::DoCommand(tile, 0, 0, CMD_BUILD_RAIL_WAYPOINT);
+ return AIObject::DoCommand(tile, GetCurrentRailType() | (GetRailTracks(tile) == RAILTRACK_NE_SW ? AXIS_X : AXIS_Y) << 4 | 1 << 8 | 1 << 16, STAT_CLASS_WAYP | INVALID_STATION << 16, CMD_BUILD_RAIL_WAYPOINT);
}
/* static */ bool AIRail::RemoveRailWaypoint(TileIndex tile)