Add setting to disable continuously updating NewGRF vehicle image

This commit is contained in:
Jonathan G Rennison
2020-11-08 11:43:23 +00:00
parent 760a1f0163
commit cde5e8c79d
7 changed files with 25 additions and 2 deletions

View File

@@ -398,7 +398,7 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
if (this->cur_speed != this->gcache.last_speed) {
SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, WID_VV_START_STOP);
this->gcache.last_speed = this->cur_speed;
if (HasBit(this->vcache.cached_veh_flags, VCF_REDRAW_ON_SPEED_CHANGE)) {
if (HasBit(this->vcache.cached_veh_flags, VCF_REDRAW_ON_SPEED_CHANGE) && !_settings_client.gui.disable_vehicle_image_update) {
this->InvalidateImageCacheOfChain();
}
}