1
0
Fork 0

Codechange: Don't delete news items or NewGRF window when EffectVehicle is deleted.

EffectVehicles never create news and can't be debugged, so searching for news items and windows to delete just wastes time.
pull/12334/head
Peter Nelson 2024-03-18 22:21:06 +00:00
parent 7580eac2d5
commit dc215e8c65
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 4 additions and 2 deletions

View File

@ -908,8 +908,10 @@ Vehicle::~Vehicle()
UpdateVehicleTileHash(this, true); UpdateVehicleTileHash(this, true);
UpdateVehicleViewportHash(this, INVALID_COORD, 0, this->sprite_cache.old_coord.left, this->sprite_cache.old_coord.top); UpdateVehicleViewportHash(this, INVALID_COORD, 0, this->sprite_cache.old_coord.left, this->sprite_cache.old_coord.top);
DeleteVehicleNews(this->index, INVALID_STRING_ID); if (this->type != VEH_EFFECT) {
DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index); DeleteVehicleNews(this->index, INVALID_STRING_ID);
DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index);
}
} }
/** /**