diff options
author | maedhros <maedhros@openttd.org> | 2007-04-20 11:05:56 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-04-20 11:05:56 +0000 |
commit | 8b65349d86f0bf71af0ec1a9bf1c08cd9adac2ec (patch) | |
tree | c0083a71d9e250f6a692f1516b1b6ef7a9a45504 | |
parent | fdf86bb4a2682eca65d6eefe89c7023cd91d7630 (diff) | |
download | openttd-8b65349d86f0bf71af0ec1a9bf1c08cd9adac2ec.tar.xz |
(svn r9684) -Fix (r9683): Remove vehicles from the station loading list instead of adding
them again when they leave, and add a v->LeaveStation() call for aircraft.
-rw-r--r-- | src/aircraft_cmd.cpp | 1 | ||||
-rw-r--r-- | src/vehicle.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 12e569552..aabe323bd 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1411,6 +1411,7 @@ static void HandleAircraftLoading(Vehicle *v, int mode) } Order b = v->current_order; + v->LeaveStation(); v->current_order.Free(); MarkAircraftDirty(v); if (!(b.flags & OF_NON_STOP)) return; diff --git a/src/vehicle.cpp b/src/vehicle.cpp index c14d376e1..d851dcb09 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2916,5 +2916,5 @@ void Vehicle::LeaveStation() assert(current_order.type == OT_LOADING); current_order.type = OT_LEAVESTATION; current_order.flags = 0; - GetStation(this->last_station_visited)->loading_vehicles.push_back(this); + GetStation(this->last_station_visited)->loading_vehicles.remove(this); } |