(svn r13467) [NoAI] -Fix [OpenTTD Core]: make CmdRemoveRoadStop use p2 as documented (only look at bit 0, not at the complete value) noai
authortruebrain
Wed, 11 Jun 2008 14:29:42 +0000
branchnoai
changeset 10915 21ea526fd075
parent 10912 48d072a192b5
child 10918 317f736e5fc6
(svn r13467) [NoAI] -Fix [OpenTTD Core]: make CmdRemoveRoadStop use p2 as documented (only look at bit 0, not at the complete value)
src/station_cmd.cpp
--- a/src/station_cmd.cpp	Wed Jun 11 13:04:27 2008 +0000
+++ b/src/station_cmd.cpp	Wed Jun 11 14:29:42 2008 +0000
@@ -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);