diff options
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 364d9b637..b66483e70 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -709,7 +709,7 @@ static void RoadVehCheckTrainCrash(Vehicle *v) 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 @@ static Vehicle* RoadVehFindCloseTo(Vehicle* v, int x, int y, Direction dir) 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 |