(svn r17816) -Codechange: move the CargoList invalidation-after-saveload to the function that handles the CargoPackets instead of spreading it around over the saveload files. Also add some code to validate whether the caches are valid; to be removed later when no problems turn up

This commit is contained in:
rubidium
2009-10-20 12:20:53 +00:00
parent 8e1f62993d
commit 079b7fa034
5 changed files with 41 additions and 10 deletions

View File

@@ -252,8 +252,6 @@ void AfterLoadVehicles(bool part_of_load)
v->first = NULL;
if (v->type == VEH_TRAIN) Train::From(v)->tcache.first_engine = INVALID_ENGINE;
if (v->type == VEH_ROAD) RoadVehicle::From(v)->rcache.first_engine = INVALID_ENGINE;
v->cargo.InvalidateCache();
}
/* AfterLoadVehicles may also be called in case of NewGRF reload, in this