@@ -1613,12 +1613,14 @@ CommandCost Vehicle::SendToDepot(DoComma
return CommandCost();
}
void Vehicle::SetNext(Vehicle *next)
{
assert(this != next);
if (this->next != NULL) {
/* We had an old next vehicle. Update the first and previous pointers */
for (Vehicle *v = this->next; v != NULL; v = v->Next()) {
v->first = this->next;
this->next->previous = NULL;