diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp index a6ab9758c0..5981d22b77 100644 --- a/src/ground_vehicle.cpp +++ b/src/ground_vehicle.cpp @@ -197,7 +197,10 @@ bool GroundVehicle::IsChainInDepot() const /* Check whether the rest is also already trying to enter the depot. */ for (; v != nullptr; v = v->Next()) { - if (!v->T::IsInDepot() || v->tile != this->tile) return false; + if (!v->T::IsInDepot()) return false; + assert(IsDepotTile(v->tile)); + assert(IsDepotTile(this->tile)); + assert(GetDepotIndex(this->tile) == GetDepotIndex(v->tile)); } return true;