Changeset - r6509:ed1b81c85367
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-04-20 17:52:28
rubidium@openttd.org
(svn r9692) -Fix (r9683): don't try to remove vehicles from the queue of a non-existing station.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -567,13 +567,13 @@ bool IsEngineCountable(const Vehicle *v)
 
		default: return false; // Only count player buildable vehicles
 
	}
 
}
 

	
 
void DestroyVehicle(Vehicle *v)
 
{
 
	if (v->last_station_visited != INVALID_STATION) {
 
	if (IsValidStationID(v->last_station_visited)) {
 
		GetStation(v->last_station_visited)->loading_vehicles.remove(v);
 
	}
 

	
 
	if (IsEngineCountable(v)) {
 
		GetPlayer(v->owner)->num_engines[v->engine_type]--;
 
		if (v->owner == _local_player) InvalidateAutoreplaceWindow(v->engine_type);
0 comments (0 inline, 0 general)