diff options
author | michi_cc <michi_cc@openttd.org> | 2011-08-03 20:55:08 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-08-03 20:55:08 +0000 |
commit | 08b7981f37431f57ca2fa8dd25db4088c7c69d4e (patch) | |
tree | d55fa560c79768b03077cb544552875e8064d17e /src/vehicle_cmd.cpp | |
parent | 442b92ff33c31317f77786f23539c2566f8252f3 (diff) | |
download | openttd-08b7981f37431f57ca2fa8dd25db4088c7c69d4e.tar.xz |
(svn r22713) -Feature: [NewGRF] Per vehicle custom cargo ageing period.
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index ec341163e..fdb9fd66c 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -30,6 +30,7 @@ #include "autoreplace_gui.h" #include "company_base.h" #include "order_backup.h" +#include "ship.h" #include "table/strings.h" @@ -373,9 +374,15 @@ CommandCost CmdRefitVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint break; 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)); break; default: NOT_REACHED(); |