- allow calling non-action functions directly from a state.

Ironically this only requires a very minor change in the calling code and an added member for the VMFunction to tell that code how many parameters to pass.
This change will allow to turn the vast majority of action functions into regular members, the only ones that still need to be an action function are the few that actually use the pointers.
This commit is contained in:
Christoph Oelckers 2016-10-22 16:35:48 +02:00
commit d714670acc
8 changed files with 22 additions and 14 deletions

View file

@ -665,6 +665,7 @@ VMFunction *FFunctionBuildList::AddFunction(PFunction *functype, FxExpression *c
it.Code = code;
it.PrintableName = name;
it.Function = new VMScriptFunction;
it.Function->ImplicitArgs = functype->GetImplicitArgs();
it.Proto = nullptr;
it.FromDecorate = fromdecorate;
mItems.Push(it);