summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-21 16:58:23 +0000
committerrubidium <rubidium@openttd.org>2007-05-21 16:58:23 +0000
commitd836b25606796cf894a8d83af6e906cd50f3c8f5 (patch)
tree9df24c6d66ee9b596826206332ce9951bfd6c897 /src
parent015c0dd9a4d8eeaa1a60ceac1f9534fae3ff7c2f (diff)
downloadopenttd-d836b25606796cf894a8d83af6e906cd50f3c8f5.tar.xz
(svn r9895) -Fix: assertion when removing roadstop.
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 313bd05b5..84780a4ce 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1397,7 +1397,9 @@ int32 CmdRemoveRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* Save the stop info before it is removed */
bool is_drive_through = IsDriveThroughStopTile(tile);
RoadTypes rts = GetRoadTypes(tile);
- RoadBits road_bits = GetAllRoadBits(tile);
+ RoadBits road_bits = IsDriveThroughStopTile(tile) ?
+ ((GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y) :
+ DiagDirToRoadBits(GetRoadStopDir(tile));
bool is_towns_road = is_drive_through && GetStopBuiltOnTownRoad(tile);
int32 ret = RemoveRoadStop(st, flags, tile);