(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
This commit is contained in:
@@ -251,8 +251,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::From(v)->tcache.first_engine = INVALID_ENGINE;
|
||||
if (v->type == VEH_ROAD) RoadVehicle::From(v)->rcache.first_engine = INVALID_ENGINE;
|
||||
if (v->IsGroundVehicle()) v->GetGroundVehicleCache()->first_engine = INVALID_ENGINE;
|
||||
}
|
||||
|
||||
/* AfterLoadVehicles may also be called in case of NewGRF reload, in this
|
||||
|
Reference in New Issue
Block a user