Changeset - r12063:19a5d1ea1b70
[Not reviewed]
master
0 2 0
smatz - 15 years ago 2009-05-31 09:33:12
smatz@openttd.org
(svn r16475) -Codechange: move code invalidating Vehicle::last_station_visited to more logical place
2 files changed with 8 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/order_cmd.cpp
Show inline comments
 
@@ -1458,11 +1458,6 @@ void RemoveOrderFromAllVehicles(OrderTyp
 
	FOR_ALL_VEHICLES(v) {
 
		Order *order;
 

	
 
		/* Forget about this station if this station is removed */
 
		if (v->last_station_visited == destination && type == OT_GOTO_STATION) {
 
			v->last_station_visited = INVALID_STATION;
 
		}
 

	
 
		order = &v->current_order;
 
		if ((v->type == VEH_AIRCRAFT && order->IsType(OT_GOTO_DEPOT) ? OT_GOTO_STATION : order->GetType()) == type &&
 
				v->current_order.GetDestination() == destination) {
src/station.cpp
Show inline comments
 
@@ -75,6 +75,14 @@ Station::~Station()
 
		if (a->targetairport == this->index) a->targetairport = INVALID_STATION;
 
	}
 

	
 
	Vehicle *v;
 
	FOR_ALL_VEHICLES(v) {
 
		/* Forget about this station if this station is removed */
 
		if (v->last_station_visited == destination && type == OT_GOTO_STATION) {
 
			v->last_station_visited = INVALID_STATION;
 
		}
 
	}
 

	
 
	MarkDirty();
 
	InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
 

	
0 comments (0 inline, 0 general)