summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-06-11 15:08:52 +0000
committerglx <glx@openttd.org>2008-06-11 15:08:52 +0000
commitf56fe58d481624fdbcf7d5897457339ee58c34bb (patch)
treeca9517713214878dd83b76d7af1e28ae4e494e6e /src
parent3d5fe9bfc1b8be56fe42a59c9bd905d96d70f128 (diff)
downloadopenttd-f56fe58d481624fdbcf7d5897457339ee58c34bb.tar.xz
(svn r13472) -Backport (r13467 from NoAI): make CmdRemoveRoadStop use p2 as documented (only look at bit 0, not at the complete value)
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index f0d1097e1..be9b30f16 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1496,7 +1496,7 @@ static CommandCost RemoveRoadStop(Station *st, uint32 flags, TileIndex tile)
CommandCost CmdRemoveRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
/* Make sure the specified tile is a road stop of the correct type */
- if (!IsTileType(tile, MP_STATION) || !IsRoadStop(tile) || (uint32)GetRoadStopType(tile) != p2) return CMD_ERROR;
+ if (!IsTileType(tile, MP_STATION) || !IsRoadStop(tile) || (uint32)GetRoadStopType(tile) != GB(p2, 0, 1)) return CMD_ERROR;
Station *st = GetStationByTile(tile);
/* Save the stop info before it is removed */
bool is_drive_through = IsDriveThroughStopTile(tile);