mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-31 18:39:10 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user