diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 19e9d4a969..6386ccfcb4 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -323,6 +323,54 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetDistance) return 0; } +//=========================================================================== +// +// A_State +// +// Returns the state passed in. +// +//=========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_State) +{ + PARAM_PROLOGUE; + PARAM_OBJECT(self, AActor); + PARAM_STATE(returnme); + ACTION_RETURN_STATE(returnme); +} + +//=========================================================================== +// +// A_Int +// +// Returns the int passed in. +// +//=========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Int) +{ + PARAM_PROLOGUE; + PARAM_OBJECT(self, AActor); + PARAM_INT(returnme); + ACTION_RETURN_INT(returnme); +} + +//=========================================================================== +// +// A_Bool +// +// Returns the bool passed in. +// +//=========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Bool) +{ + PARAM_PROLOGUE; + PARAM_OBJECT(self, AActor); + PARAM_BOOL(returnme); + ACTION_RETURN_BOOL(returnme); +} + //========================================================================== // // A_RearrangePointers @@ -6757,48 +6805,3 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMovementDirection) } ACTION_RETURN_BOOL(true); } - -//=========================================================================== -// -// A_State -// -// Returns the state passed in. -// -//=========================================================================== - -DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_State) -{ - PARAM_ACTION_PROLOGUE; - PARAM_STATE(returnme); - ACTION_RETURN_STATE(returnme); -} - -//=========================================================================== -// -// A_Int -// -// Returns the int passed in. -// -//=========================================================================== - -DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Int) -{ - PARAM_ACTION_PROLOGUE; - PARAM_INT(returnme); - ACTION_RETURN_INT(returnme); -} - -//=========================================================================== -// -// A_Bool -// -// Returns the bool passed in. -// -//=========================================================================== - -DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Bool) -{ - PARAM_ACTION_PROLOGUE; - PARAM_BOOL(returnme); - ACTION_RETURN_BOOL(returnme); -} diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 54bc6c07cf..b8a04c10e7 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -43,6 +43,10 @@ ACTOR Actor native //: Thinker native int CountInv(class itemtype, int ptr_select = AAPTR_DEFAULT); native float GetDistance(bool checkz, int ptr = AAPTR_DEFAULT); + native state A_State(state returnme); + native int A_Int(int returnme); + native bool A_Bool(bool returnme); + // Action functions // Meh, MBF redundant functions. Only for DeHackEd support. action native A_Turn(float angle = 0); @@ -331,10 +335,6 @@ ACTOR Actor native //: Thinker action native int ACS_NamedLockedExecuteDoor(name script, int mapnum=0, int arg1=0, int arg2=0, int lock=0); action native int ACS_NamedExecuteWithResult(name script, int arg1=0, int arg2=0, int arg3=0, int arg4=0); action native ACS_NamedExecuteAlways(name script, int mapnum=0, int arg1=0, int arg2=0, int arg3=0); - - native state A_State(state returnme); - native int A_Int(int returnme); - native bool A_Bool(bool returnme); States {