Added A_RaiseActor(Actor other, int flags = 0)

This commit is contained in:
Major Cooke 2018-11-06 11:20:51 -06:00 committed by Christoph Oelckers
parent b553be153d
commit 71d2b39d92
3 changed files with 18 additions and 0 deletions

View file

@ -4564,6 +4564,20 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseSelf)
ACTION_RETURN_BOOL(P_Thing_Raise(self, NULL, (flags & RF_NOCHECKPOSITION))); ACTION_RETURN_BOOL(P_Thing_Raise(self, NULL, (flags & RF_NOCHECKPOSITION)));
} }
//===========================================================================
//
// A_RaiseActor
//
// Generalized version that allows passing pointers for ZScript's sake.
//===========================================================================
DEFINE_ACTION_FUNCTION(AActor, A_RaiseActor)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_OBJECT(other, AActor);
PARAM_INT_DEF(flags);
ACTION_RETURN_BOOL(P_Thing_Raise(other, self, (flags & RF_NOCHECKPOSITION)));
}
//=========================================================================== //===========================================================================
// //
// CanRaise // CanRaise

View file

@ -434,6 +434,9 @@ void P_RemoveThing(AActor * actor)
bool P_Thing_Raise(AActor *thing, AActor *raiser, int nocheck) bool P_Thing_Raise(AActor *thing, AActor *raiser, int nocheck)
{ {
if (!thing)
return false;
FState * RaiseState = thing->GetRaiseState(); FState * RaiseState = thing->GetRaiseState();
if (RaiseState == NULL) if (RaiseState == NULL)
{ {

View file

@ -1092,6 +1092,7 @@ class Actor : Thinker native
native void A_RaiseChildren(int flags = 0); native void A_RaiseChildren(int flags = 0);
native void A_RaiseSiblings(int flags = 0); native void A_RaiseSiblings(int flags = 0);
native bool A_RaiseSelf(int flags = 0); native bool A_RaiseSelf(int flags = 0);
native bool A_RaiseActor(Actor other, int flags = 0);
native bool CanRaise(); native bool CanRaise();
native void Revive(); native void Revive();
action native bool, Actor A_ThrowGrenade(class<Actor> itemtype, double zheight = 0, double xyvel = 0, double zvel = 0, bool useammo = true); action native bool, Actor A_ThrowGrenade(class<Actor> itemtype, double zheight = 0, double xyvel = 0, double zvel = 0, bool useammo = true);