changeset 9494:3503f9917e4a draft

(svn r13472) -Backport (r13467 from NoAI): make CmdRemoveRoadStop use p2 as documented (only look at bit 0, not at the complete value)
author glx <glx@openttd.org>
date Wed, 11 Jun 2008 15:08:52 +0000
parents 83bad4f336b3
children 9fd9426b36c9
files src/station_cmd.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1496,7 +1496,7 @@
 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);