(svn r25648) -Change [FS#5669]: [NewGRF] Invalidate vehicle recolour palette during (un)loading.

This commit is contained in:
frosch
2013-08-04 14:02:27 +00:00
parent a3efc99034
commit 5bda07c10c
6 changed files with 13 additions and 15 deletions

View File

@@ -478,18 +478,17 @@ CommandCost CmdRefitVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
case VEH_SHIP:
v->InvalidateNewGRFCacheOfChain();
v->colourmap = PAL_NONE; // invalidate vehicle colour map
Ship::From(v)->UpdateCache();
break;
case VEH_AIRCRAFT:
v->InvalidateNewGRFCacheOfChain();
v->colourmap = PAL_NONE; // invalidate vehicle colour map
UpdateAircraftCache(Aircraft::From(v), true);
break;
default: NOT_REACHED();
}
front->MarkDirty();
InvalidateWindowData(WC_VEHICLE_DETAILS, front->index);
SetWindowDirty(WC_VEHICLE_DEPOT, front->tile);