(svn r19707) -Add: helper functions to instantiate/fill ResolverObjects

This commit is contained in:
rubidium
2010-04-24 13:35:18 +00:00
parent e75e2648fc
commit 1da0086a45
7 changed files with 71 additions and 0 deletions

View File

@@ -1188,3 +1188,14 @@ void CommitVehicleListOrderChanges()
/* Clear out the queue */
_list_order_changes.Reset();
}
/**
* Resolve an engine's spec and such so we can get a variable.
* @param ro The resolver object to fill.
* @param index The vehicle to get the data from.
*/
void GetVehicleResolver(ResolverObject *ro, uint index)
{
Vehicle *v = Vehicle::Get(index);
NewVehicleResolver(ro, v->engine_type, v);
}