diff options
author | frosch <frosch@openttd.org> | 2012-01-22 21:17:38 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-01-22 21:17:38 +0000 |
commit | f591787e4a6b7f368948f07a7ded1f0b2f3fdffa (patch) | |
tree | 3bc89a6eb33ee93c30d99ce1f48e7689e9861a4c | |
parent | a18e077006df05b8bd46b150bb06b4fbb9f44d51 (diff) | |
download | openttd-f591787e4a6b7f368948f07a7ded1f0b2f3fdffa.tar.xz |
(svn r23841) -Fix: Clear NewGRF vehicle cache when their owner changes. (esp. vehicle var 43)
-rw-r--r-- | src/economy.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |