mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
Return a FxVMFunctionCall from DoActionSpecials()
- DoActionSpecials no longer sets the function call in FStateTempCall. Instead, it returns the function so the caller can do it.
This commit is contained in:
parent
320fb9aec5
commit
910451a351
1 changed files with 5 additions and 6 deletions
|
@ -66,7 +66,7 @@ TDeletingArray<FStateTempCall *> StateTempCalls;
|
||||||
// handles action specials as code pointers
|
// handles action specials as code pointers
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
bool DoActionSpecials(FScanner &sc, FState & state, Baggage &bag, FStateTempCall *tcall)
|
FxVMFunctionCall *DoActionSpecials(FScanner &sc, FState & state, Baggage &bag)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int min_args, max_args;
|
int min_args, max_args;
|
||||||
|
@ -100,11 +100,9 @@ bool DoActionSpecials(FScanner &sc, FState & state, Baggage &bag, FStateTempCall
|
||||||
{
|
{
|
||||||
sc.ScriptError ("Too many arguments to %s", specname.GetChars());
|
sc.ScriptError ("Too many arguments to %s", specname.GetChars());
|
||||||
}
|
}
|
||||||
|
return new FxVMFunctionCall(FindGlobalActionFunction("A_CallSpecial"), args, sc);
|
||||||
tcall->Call = new FxVMFunctionCall(FindGlobalActionFunction("A_CallSpecial"), args, sc);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -319,7 +317,8 @@ do_stop:
|
||||||
// Make the action name lowercase
|
// Make the action name lowercase
|
||||||
strlwr (sc.String);
|
strlwr (sc.String);
|
||||||
|
|
||||||
if (DoActionSpecials(sc, state, bag, tcall))
|
tcall->Call = DoActionSpecials(sc, state, bag);
|
||||||
|
if (tcall->Call != NULL)
|
||||||
{
|
{
|
||||||
goto endofstate;
|
goto endofstate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue