equal
deleted
inserted
replaced
588 * other artic parts. */ |
588 * other artic parts. */ |
589 if ((this->type == VEH_TRAIN && EngineHasArticPart(this)) || (this->type == VEH_ROAD && RoadVehHasArticPart(this))) { |
589 if ((this->type == VEH_TRAIN && EngineHasArticPart(this)) || (this->type == VEH_ROAD && RoadVehHasArticPart(this))) { |
590 delete this->Next(); |
590 delete this->Next(); |
591 } |
591 } |
592 |
592 |
593 Window *w = FindWindowById(WC_MAIN_WINDOW, 0); |
593 extern void StopGlobalFollowVehicle(const Vehicle *v); |
594 if (w != NULL && w->viewport->follow_vehicle == this->index) { |
594 StopGlobalFollowVehicle(this); |
595 ScrollMainWindowTo(this->x_pos, this->y_pos, true); // lock the main view on the vehicle's last position |
|
596 w->viewport->follow_vehicle = INVALID_VEHICLE; |
|
597 } |
|
598 } |
595 } |
599 |
596 |
600 Vehicle::~Vehicle() |
597 Vehicle::~Vehicle() |
601 { |
598 { |
602 free(this->name); |
599 free(this->name); |