mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
Exported bounce functions
This commit is contained in:
parent
955a841884
commit
3dce874621
2 changed files with 49 additions and 0 deletions
|
@ -1814,6 +1814,51 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, CheckFor3DCeilingHit, CheckFor3DCeilingHit
|
|||
ACTION_RETURN_BOOL(P_CheckFor3DCeilingHit(self, z, trigger));
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
// Bounce exports
|
||||
//
|
||||
//=====================================================================================
|
||||
DEFINE_ACTION_FUNCTION(AActor, BounceActor)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_OBJECT(blocking, AActor);
|
||||
PARAM_BOOL(onTop);
|
||||
|
||||
ACTION_RETURN_BOOL(P_BounceActor(self, blocking, onTop));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, BounceWall)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_POINTER(l, line_t);
|
||||
|
||||
auto cur = self->BlockingLine;
|
||||
if (l)
|
||||
self->BlockingLine = l;
|
||||
|
||||
bool res = P_BounceWall(self);
|
||||
self->BlockingLine = cur;
|
||||
|
||||
ACTION_RETURN_BOOL(res);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, BouncePlane)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_POINTER(plane, secplane_t);
|
||||
|
||||
ACTION_RETURN_BOOL(self->FloorBounceMissile(*plane));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, PlayBounceSound)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_BOOL(onFloor);
|
||||
|
||||
self->PlayBounceSound(onFloor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int isFrozen(AActor *self)
|
||||
|
|
|
@ -810,6 +810,10 @@ class Actor : Thinker native
|
|||
native clearscope double GetGravity() const;
|
||||
native void DoMissileDamage(Actor target);
|
||||
native void PlayPushSound();
|
||||
native bool BounceActor(Actor blocking, bool onTop);
|
||||
native bool BounceWall(Line l = null);
|
||||
native bool BouncePlane(SecPlane plane);
|
||||
native void PlayBounceSound(bool onFloor);
|
||||
|
||||
clearscope double PitchTo(Actor target, double zOfs = 0, double targZOfs = 0, bool absolute = false) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue