Fix definitions of A_State/A_Int/A_Bool

- These aren't action functions, so PARAM_ACTION_PROLOGUE is
  inappropriate.
This commit is contained in:
Randy Heit 2016-02-19 00:29:19 -06:00
parent cb0fd5967f
commit a31bd78abe
2 changed files with 52 additions and 49 deletions

View File

@ -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);
}

View File

@ -43,6 +43,10 @@ ACTOR Actor native //: Thinker
native int CountInv(class<Inventory> 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
{