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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user