1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

Codechange: Remove redundant checks in FindClosestTrainDepot

This commit is contained in:
Koen Bussemaker
2024-11-16 15:07:53 +01:00
committed by Kuhnovic
parent f9b5f78b8a
commit 369ea29e1e

View File

@@ -2167,11 +2167,6 @@ static FindDepotData FindClosestTrainDepot(Train *v, int max_distance)
{
assert(!(v->vehstatus & VS_CRASHED));
if (IsRailDepotTile(v->tile)) return FindDepotData(v->tile, 0);
PBSTileInfo origin = FollowTrainReservation(v);
if (IsRailDepotTile(origin.tile)) return FindDepotData(origin.tile, 0);
return YapfTrainFindNearestDepot(v, max_distance);
}