(svn r23841) -Fix: Clear NewGRF vehicle cache when their owner changes. (esp. vehicle var 43)

pull/155/head
frosch 13 years ago
parent a8452f7bc9
commit 2b54794417

@ -419,7 +419,10 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
assert(new_owner != INVALID_OWNER);
v->owner = new_owner;
/* Owner changes, clear cache */
v->colourmap = PAL_NONE;
v->InvalidateNewGRFCache();
if (v->IsEngineCountable()) {
GroupStatistics::CountEngine(v, 1);

Loading…
Cancel
Save