diff --git a/src/p_things.cpp b/src/p_things.cpp index 06a0252ab..0ff35bdcc 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -945,3 +945,25 @@ int P_Thing_Warp(AActor *caller, AActor *reference, double xofs, double yofs, do caller->SetOrigin(old, true); return false; } + +//========================================================================== +// +// A_Warp +// +//========================================================================== + +DEFINE_ACTION_FUNCTION(AActor, Warp) +{ + PARAM_SELF_PROLOGUE(AActor) + PARAM_OBJECT_DEF(destination, AActor) + PARAM_FLOAT_DEF(xofs) + PARAM_FLOAT_DEF(yofs) + PARAM_FLOAT_DEF(zofs) + PARAM_ANGLE_DEF(angle) + PARAM_INT_DEF(flags) + PARAM_FLOAT_DEF(heightoffset) + PARAM_FLOAT_DEF(radiusoffset) + PARAM_ANGLE_DEF(pitch) + + ACTION_RETURN_INT(!!P_Thing_Warp(self, destination, xofs, yofs, zofs, angle, flags, heightoffset, radiusoffset, pitch)); +} diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 3d272b05d..28b4039c0 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -683,6 +683,7 @@ class Actor : Thinker native native float AccuracyFactor(); native bool MorphMonster (Class spawntype, int duration, int style, Class enter_flash, Class exit_flash); action native void SetCamera(Actor cam, bool revert = false); + native bool Warp(AActor *dest, double xofs = 0, double yofs = 0, double zofs = 0, double angle = 0, int flags = 0, double heightoffset = 0, double radiusoffset = 0, double pitch = 0); // DECORATE compatible functions native clearscope int CountInv(class itemtype, int ptr_select = AAPTR_DEFAULT) const;