- fixed: CALL_ACTION always set 3 args, even for normal methods. Also moved this to a sunfunction because the macro created a lot of code.

This commit is contained in:
Christoph Oelckers 2016-11-06 01:34:54 +01:00
commit c9a96ed0ae
2 changed files with 10 additions and 4 deletions

View file

@ -491,3 +491,10 @@ int VMFrameStack::Call(VMFunction *func, VMValue *params, int numparams, VMRetur
throw;
}
}
class AActor;
void CallAction(VMFrameStack *stack, VMFunction *vmfunc, AActor *self)
{
VMValue params[3] = { self, self, VMValue(nullptr, ATAG_GENERIC) };
stack->Call(vmfunc, params, vmfunc->ImplicitArgs, nullptr, 0, nullptr);
}