(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:
rubidium
2009-05-23 09:10:56 +00:00
parent da5661a0c8
commit 6237fe1462
16 changed files with 71 additions and 53 deletions

View File

@@ -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);