mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Remove redundant checks in FindClosestTrainDepot
parent
f9b5f78b8a
commit
369ea29e1e
|
@ -2167,11 +2167,6 @@ static FindDepotData FindClosestTrainDepot(Train *v, int max_distance)
|
||||||
{
|
{
|
||||||
assert(!(v->vehstatus & VS_CRASHED));
|
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);
|
return YapfTrainFindNearestDepot(v, max_distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue