- changed action function interface so that callers can be identified directly, instead of guessing it from looking at the parameters.
With arbitrary PSP layers the old method was no longer safe because the layer ID was not available in the action function.
This commit is contained in:
parent
7ccdbf9b62
commit
cfaa3e3fa9
9 changed files with 54 additions and 32 deletions
|
|
@ -69,14 +69,14 @@ void FState::SetAction(const char *name)
|
|||
ActionFunc = FindGlobalActionFunction(name)->Variants[0].Implementation;
|
||||
}
|
||||
|
||||
bool FState::CallAction(AActor *self, AActor *stateowner, FState **stateret)
|
||||
bool FState::CallAction(AActor *self, AActor *stateowner, FStateParamInfo *info, FState **stateret)
|
||||
{
|
||||
if (ActionFunc != NULL)
|
||||
{
|
||||
ActionCycles.Clock();
|
||||
|
||||
static VMFrameStack stack;
|
||||
VMValue params[3] = { self, stateowner, VMValue(this, ATAG_STATE) };
|
||||
VMValue params[3] = { self, stateowner, VMValue(info, ATAG_STATEINFO) };
|
||||
// If the function returns a state, store it at *stateret.
|
||||
// If it doesn't return a state but stateret is non-NULL, we need
|
||||
// to set *stateret to NULL.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue