(svn r9684) -Fix (r9683): Remove vehicles from the station loading list instead of adding
authormaedhros
Fri, 20 Apr 2007 11:05:56 +0000
changeset 6997 bc9de79c355c
parent 6996 99dd61b18d69
child 6998 403314de0154
(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.
src/aircraft_cmd.cpp
src/vehicle.cpp
--- a/src/aircraft_cmd.cpp	Fri Apr 20 08:00:30 2007 +0000
+++ b/src/aircraft_cmd.cpp	Fri Apr 20 11:05:56 2007 +0000
@@ -1411,6 +1411,7 @@
 			}
 
 			Order b = v->current_order;
+			v->LeaveStation();
 			v->current_order.Free();
 			MarkAircraftDirty(v);
 			if (!(b.flags & OF_NON_STOP)) return;
--- a/src/vehicle.cpp	Fri Apr 20 08:00:30 2007 +0000
+++ b/src/vehicle.cpp	Fri Apr 20 11:05:56 2007 +0000
@@ -2916,5 +2916,5 @@
 	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);
 }