- exported P_Thing_Warp to ZScript.

This commit is contained in:
Christoph Oelckers 2017-11-13 21:00:17 +01:00
parent 5d83ee5e89
commit 5935e14c09
2 changed files with 23 additions and 0 deletions

View File

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

View File

@ -683,6 +683,7 @@ class Actor : Thinker native
native float AccuracyFactor();
native bool MorphMonster (Class<Actor> spawntype, int duration, int style, Class<Actor> enter_flash, Class<Actor> 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<Inventory> itemtype, int ptr_select = AAPTR_DEFAULT) const;