src/roadveh_cmd.cpp
changeset 7367 a0499d5cb8e5
parent 7353 716c6dd9322a
child 7375 e8639f73a615
--- a/src/roadveh_cmd.cpp	Tue Jun 12 09:41:12 2007 +0000
+++ b/src/roadveh_cmd.cpp	Tue Jun 12 11:22:32 2007 +0000
@@ -709,7 +709,7 @@
 
 		if (!IsLevelCrossingTile(tile)) continue;
 
-		if (VehicleFromPos(tile, u, EnumCheckRoadVehCrashTrain) != NULL) {
+		if (VehicleFromPosXY(v->x_pos, v->y_pos, u, EnumCheckRoadVehCrashTrain) != NULL) {
 			RoadVehCrash(v);
 			return;
 		}
@@ -889,7 +889,7 @@
 	rvf.y = y;
 	rvf.dir = dir;
 	rvf.veh = v;
-	u = (Vehicle*)VehicleFromPos(TileVirtXY(x, y), &rvf, EnumCheckRoadVehClose);
+	u = (Vehicle*)VehicleFromPosXY(x, y, &rvf, EnumCheckRoadVehClose);
 
 	/* This code protects a roadvehicle from being blocked for ever
 	 * If more than 1480 / 74 days a road vehicle is blocked, it will