(svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor.

This commit is contained in:
frosch
2014-03-03 20:02:31 +00:00
parent b0680afaa5
commit ce92faf682
17 changed files with 143 additions and 184 deletions

View File

@@ -79,7 +79,7 @@ class NIHVehicle : public NIHelper {
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
{
Vehicle *v = Vehicle::Get(index);
VehicleResolverObject ro(v->engine_type, v);
VehicleResolverObject ro(v->engine_type, v, VehicleResolverObject::WO_CACHED);
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
}
};
@@ -429,7 +429,7 @@ class NIHRailType : public NIHelper {
{
/* There is no unique GRFFile for the tile. Multiple GRFs can define different parts of the railtype.
* However, currently the NewGRF Debug GUI does not display variables depending on the GRF (like 0x7F) anyway. */
RailTypeResolverObject ro(index, TCX_NORMAL, NULL);
RailTypeResolverObject ro(NULL, index, TCX_NORMAL, RTSG_END);
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
}
};