forked from mirror/OpenTTD
(svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
This commit is contained in:
@@ -130,7 +130,7 @@ void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection, int c
|
||||
int highlight_w = 0;
|
||||
|
||||
for (int dx = 0; v != NULL && dx < max_length ; v = v->Next()) {
|
||||
int width = ((RoadVehicle *)v)->cached_veh_length;
|
||||
int width = ((RoadVehicle *)v)->rcache.cached_veh_length;
|
||||
|
||||
if (dx + width > 0 && dx <= max_length) {
|
||||
SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
|
||||
|
Reference in New Issue
Block a user