mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Add 'float' and 'state' as possible return types for action functions
This commit is contained in:
parent
45108e9bb8
commit
0f70d10521
2 changed files with 9 additions and 0 deletions
|
@ -3147,6 +3147,7 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
|
|||
else if (rets[0] == TypeFloat64) ValueType = VAL_Float;
|
||||
else if (rets[0] == TypeAngle) ValueType = VAL_Angle;
|
||||
else if (rets[0] == TypeFixed) ValueType = VAL_Fixed;
|
||||
else if (rets[0] == TypeState) ValueType = VAL_State;
|
||||
else
|
||||
{
|
||||
ValueType = VAL_Int;
|
||||
|
|
|
@ -1040,6 +1040,14 @@ static void ParseActionDef (FScanner &sc, PClassActor *cls)
|
|||
{
|
||||
rets.Push(TypeSInt32);
|
||||
}
|
||||
else if (sc.CheckToken(TK_State))
|
||||
{
|
||||
rets.Push(TypeState);
|
||||
}
|
||||
else if (sc.CheckToken(TK_Float))
|
||||
{
|
||||
rets.Push(TypeFloat64);
|
||||
}
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
funcname = sc.String;
|
||||
ParseFunctionDef(sc, cls, funcname, rets, VARF_Method | VARF_Action);
|
||||
|
|
Loading…
Reference in a new issue