mirror of https://github.com/OpenTTD/OpenTTD.git
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.
This commit is contained in:
parent
7580eac2d5
commit
737e3feaf0
|
@ -908,8 +908,10 @@ Vehicle::~Vehicle()
|
|||
|
||||
UpdateVehicleTileHash(this, true);
|
||||
UpdateVehicleViewportHash(this, INVALID_COORD, 0, this->sprite_cache.old_coord.left, this->sprite_cache.old_coord.top);
|
||||
DeleteVehicleNews(this->index, INVALID_STRING_ID);
|
||||
DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index);
|
||||
if (this->type != VEH_EFFECT) {
|
||||
DeleteVehicleNews(this->index, INVALID_STRING_ID);
|
||||
DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue