diff options
author | rubidium <rubidium@openttd.org> | 2010-08-18 15:58:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-18 15:58:30 +0000 |
commit | 287ee8c01d900ef15bd434e61607c0f341ec2d7e (patch) | |
tree | a42028ee5beaf4a395062e7e382d34a792a3e095 /src/vehicle.cpp | |
parent | d28985fe8e701f061344f457d7c8704ad63d1ad8 (diff) | |
download | openttd-287ee8c01d900ef15bd434e61607c0f341ec2d7e.tar.xz |
(svn r20541) -Fix: when removing a vehicle update the "clone orders of"-vehicle of a backed up order, or remove it if there is no vehicle sharing orders with that vehicle.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 0089514f8..c19d03abc 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -51,6 +51,7 @@ #include "engine_base.h" #include "newgrf.h" #include "core/backup_type.hpp" +#include "order_backup.h" #include "table/sprites.h" #include "table/strings.h" @@ -674,6 +675,7 @@ void Vehicle::PreDestructor() DeleteWindowById(WC_VEHICLE_DETAILS, this->index); DeleteWindowById(WC_VEHICLE_TIMETABLE, this->index); SetWindowDirty(WC_COMPANY, this->owner); + OrderBackup::ClearVehicle(this); } InvalidateWindowClassesData(GetWindowClassForVehicleType(this->type), 0); |