diff options
author | frosch <frosch@openttd.org> | 2009-10-27 20:37:55 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-10-27 20:37:55 +0000 |
commit | 334b809644fd8055b7e45c790f42ffb1ab990878 (patch) | |
tree | 1b3f7e9926621a54e4bacbdd77215d467148f5cc /src/roadveh_cmd.cpp | |
parent | 778f6533ea9932ab79d495b08e625f1ffb6fc23e (diff) | |
download | openttd-334b809644fd8055b7e45c790f42ffb1ab990878.tar.xz |
(svn r17894) -Fix: Invalidate cache of vehicle vars 40-43 after testruns of certain commands, that change them temporarily.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index b092b4c60..74271a1d7 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -2083,7 +2083,11 @@ CommandCost CmdRefitRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint } } - if (flags & DC_EXEC) RoadVehUpdateCache(RoadVehicle::Get(p1)->First()); + if (flags & DC_EXEC) { + RoadVehUpdateCache(RoadVehicle::Get(p1)->First()); + } else { + v->InvalidateNewGRFCacheOfChain(); // always invalidate; querycost might have filled it + } _returned_refit_capacity = total_capacity; |