diff --git a/src/scripting/vmthunks_actors.cpp b/src/scripting/vmthunks_actors.cpp index a067a296e..b366e679c 100644 --- a/src/scripting/vmthunks_actors.cpp +++ b/src/scripting/vmthunks_actors.cpp @@ -1587,6 +1587,37 @@ DEFINE_ACTION_FUNCTION_NATIVE(AKey, GetKeyType, P_GetKeyType) ACTION_RETURN_POINTER(P_GetKeyType(num)); } +//===================================================================================== +// +// 3D Floor exports +// +//===================================================================================== +int CheckFor3DFloorHit(AActor *self, double z, bool trigger) +{ + return P_CheckFor3DFloorHit(self, z, trigger); +} +DEFINE_ACTION_FUNCTION_NATIVE(AActor, CheckFor3DFloorHit, CheckFor3DFloorHit) +{ + PARAM_SELF_PROLOGUE(AActor); + PARAM_FLOAT(z); + PARAM_BOOL(trigger); + + ACTION_RETURN_BOOL(P_CheckFor3DFloorHit(self, z, trigger)); +} + +int CheckFor3DCeilingHit(AActor *self, double z, bool trigger) +{ + return P_CheckFor3DCeilingHit(self, z, trigger); +} +DEFINE_ACTION_FUNCTION_NATIVE(AActor, CheckFor3DCeilingHit, CheckFor3DCeilingHit) +{ + PARAM_SELF_PROLOGUE(AActor); + PARAM_FLOAT(z); + PARAM_BOOL(trigger); + + ACTION_RETURN_BOOL(P_CheckFor3DCeilingHit(self, z, trigger)); +} + DEFINE_FIELD(AActor, snext) diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 6b09698aa..0b8fc96c2 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -625,6 +625,8 @@ class Actor : Thinker native native clearscope Actor GetPointer(int aaptr); native double BulletSlope(out FTranslatedLineTarget pLineTarget = null, int aimflags = 0); native void CheckFakeFloorTriggers (double oldz, bool oldz_has_viewheight = false); + native bool CheckFor3DFloorHit(double z, bool trigger); + native bool CheckFor3DCeilingHit(double z, bool trigger); native bool CheckMissileSpawn(double maxdist); native bool CheckPosition(Vector2 pos, bool actorsonly = false, FCheckPosition tm = null);