(svn r9895) -Fix: assertion when removing roadstop.
authorrubidium
Mon, 21 May 2007 16:58:23 +0000
changeset 6664 aed6a5b1c992
parent 6663 3f0ebbd21f88
child 6665 df9d1f91abcc
(svn r9895) -Fix: assertion when removing roadstop.
src/station_cmd.cpp
--- a/src/station_cmd.cpp	Sun May 20 22:43:26 2007 +0000
+++ b/src/station_cmd.cpp	Mon May 21 16:58:23 2007 +0000
@@ -1397,7 +1397,9 @@
 	/* 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);