diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -359,7 +359,7 @@ static int GetVehicleFromDepotWndPt(cons while (v != NULL && (x -= v->u.rail.cached_veh_length) >= 0) v = v->Next(); /* if an articulated part was selected, find its parent */ - while (v != NULL && IsArticulatedPart(v)) v = GetPrevVehicleInChain(v); + while (v != NULL && IsArticulatedPart(v)) v = v->Previous(); d->wagon = v; @@ -398,7 +398,7 @@ static void TrainDepotMoveVehicle(Vehicl if (wagon == NULL) { if (head != NULL) wagon = GetLastVehicleInChain(head); } else { - wagon = GetPrevVehicleInChain(wagon); + wagon = wagon->Previous(); if (wagon == NULL) return; } @@ -475,7 +475,7 @@ static void HandleCloneVehClick(const Ve if (v == NULL) return; if (v->HasFront() && !v->IsPrimaryVehicle()) { - v = GetFirstVehicleInChain(v); + v = v->First(); /* Do nothing when clicking on a train in depot with no loc attached */ if (v->type == VEH_TRAIN && !IsFrontEngine(v)) return; }