Mercurial > hg > openttd
changeset 12561:ea67e4c6c497 draft
(svn r16999) -Fix (r16993): AIs couldn't build waypoints anymore
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 30 Jul 2009 22:05:57 +0000 |
parents | 1bcc31feab1f |
children | e6b8a343eb13 |
files | src/ai/api/ai_rail.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)