Add several NewGRF variables to vehicle image callback whitelist

Add vehicle flags to control cached image invalidation

Various refactorings
This commit is contained in:
Jonathan G Rennison
2020-08-25 01:26:44 +01:00
parent c82d372d54
commit 810bfd276e
45 changed files with 325 additions and 161 deletions

View File

@@ -398,6 +398,9 @@ 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)) {
this->InvalidateImageCacheOfChain();
}
}
}