1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 18:09:09 +00:00

Codechange: Remove redundant checks in FindClosestTrainDepot

This commit is contained in:
Koen Bussemaker
2024-11-16 15:07:53 +01:00
parent 8c395ed67c
commit 8c3a20cda9

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);
}