Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript.

This commit is contained in:
Chronos Ouroboros 2018-12-08 15:56:06 -02:00 committed by drfrag
parent 38e682a267
commit 803cb16d99
2 changed files with 33 additions and 0 deletions

View file

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

View file

@ -623,6 +623,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);