Codechange: Don't delete news items or NewGRF window when EffectVehicle is deleted. (#12334)
EffectVehicles never create news and can't be debugged, so searching for news items and windows to delete just wastes time.
(cherry picked from commit 737e3feaf0
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
fc4ea241b0
commit
d7f029344f
@@ -1278,9 +1278,11 @@ Vehicle::~Vehicle()
|
||||
|
||||
if (this->type < VEH_COMPANY_END) UpdateVehicleTileHash(this, true);
|
||||
UpdateVehicleViewportHash(this, INVALID_COORD, 0);
|
||||
if (this->type != VEH_EFFECT) {
|
||||
DeleteVehicleNews(this->index, INVALID_STRING_ID);
|
||||
DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Vehicle pool is about to be cleaned
|
||||
|
Reference in New Issue
Block a user