(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 4c0542c17f
commit cd382b28a3
16 changed files with 71 additions and 53 deletions

View File

@@ -253,7 +253,7 @@ void AfterLoadVehicles(bool part_of_load)
if (part_of_load) v->fill_percent_te_id = INVALID_TE_ID;
v->first = NULL;
if (v->type == VEH_TRAIN) ((Train *)v)->tcache.first_engine = INVALID_ENGINE;
if (v->type == VEH_ROAD) ((RoadVehicle *)v)->first_engine = INVALID_ENGINE;
if (v->type == VEH_ROAD) ((RoadVehicle *)v)->rcache.first_engine = INVALID_ENGINE;
v->cargo.InvalidateCache();
}