- Changed state calls to use the VM's standard return value mechanism. StateCallData has been

removed as a result, so now action functions take a minimum of three parameters rather than four.

SVN r3770 (scripting)
This commit is contained in:
Randy Heit 2012-07-17 05:31:41 +00:00
commit fcceeb814a
7 changed files with 164 additions and 162 deletions

View file

@ -57,13 +57,12 @@ extern void ClearStrifeTypes();
TArray<PClassActor *> PClassActor::AllActorClasses;
bool FState::CallAction(AActor *self, AActor *stateowner, StateCallData *statecall)
bool FState::CallAction(AActor *self, AActor *stateowner)
{
if (ActionFunc != NULL)
{
//ActionFunc(self, stateowner, this, ParameterIndex-1, statecall);
VMFrameStack stack;
VMValue params[4] = { self, stateowner, VMValue(this, ATAG_STATE), statecall };
VMValue params[3] = { self, stateowner, VMValue(this, ATAG_STATE) };
stack.Call(ActionFunc, params, countof(params), NULL, 0, NULL);
return true;
}