1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 10:29:10 +00:00

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

This commit is contained in:
frosch
2012-01-22 21:17:38 +00:00
parent a18e077006
commit f591787e4a

View File

@@ -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);