diff src/station_cmd.cpp @ 6664:d6b2f3c0cd3b draft

(svn r9895) -Fix: assertion when removing roadstop.
author rubidium <rubidium@openttd.org>
date Mon, 21 May 2007 16:58:23 +0000
parents baa28c8cfe84
children 2a72960b1ec6
line wrap: on
line diff
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -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);