(svn r17894) -Fix: Invalidate cache of vehicle vars 40-43 after testruns of certain commands, that change them temporarily.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user