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

@@ -466,6 +466,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
/* Owner changes, clear cache */
v->colourmap = PAL_NONE;
v->InvalidateNewGRFCache();
v->InvalidateImageCache();
if (v->IsEngineCountable()) {
GroupStatistics::CountEngine(v, 1);