From f591787e4a6b7f368948f07a7ded1f0b2f3fdffa Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 22 Jan 2012 21:17:38 +0000 Subject: (svn r23841) -Fix: Clear NewGRF vehicle cache when their owner changes. (esp. vehicle var 43) --- src/economy.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/economy.cpp b/src/economy.cpp index 33dfec3cc..d5652cd49 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -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); -- cgit v1.2.3-70-g09d2