From 7dbd0582b6c1aa22a0345d63a2b71b98013c84d2 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 27 Jan 2009 19:44:36 +0000 Subject: (svn r15286) -Fix: Refitting did not invalidate vehicle-colour-maps of road-vehicles, ships and aircraft, as well vehicle-length of road-vehicles. --- src/ship_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ship_cmd.cpp') diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 37d2ef78e..e675ebd77 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -44,6 +44,7 @@ #include "ai/ai.hpp" #include "table/strings.h" +#include "table/sprites.h" static const uint16 _ship_sprites[] = {0x0E5D, 0x0E55, 0x0E65, 0x0E6D}; @@ -953,6 +954,7 @@ CommandCost CmdRefitShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, con v->cargo.Truncate((v->cargo_type == new_cid) ? capacity : 0); v->cargo_type = new_cid; v->cargo_subtype = new_subtype; + v->colormap = PAL_NONE; // invalidate vehicle colour map InvalidateWindow(WC_VEHICLE_DETAILS, v->index); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); InvalidateWindowClassesData(WC_SHIPS_LIST, 0); -- cgit v1.2.3-54-g00ecf