summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp6
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;