mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
Added CheckMove() function to ZScript Actor class
https://forum.zdoom.org/viewtopic.php?t=58964
This commit is contained in:
parent
d8aa53f5b1
commit
c4648a2b1c
3 changed files with 18 additions and 0 deletions
|
@ -2879,6 +2879,14 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags)
|
|||
return true;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, CheckMove)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_FLOAT(x);
|
||||
PARAM_FLOAT(y);
|
||||
PARAM_INT_DEF(flags);
|
||||
ACTION_RETURN_BOOL(P_CheckMove(self, DVector2(x, y), flags));
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -624,6 +624,7 @@ class Actor : Thinker native
|
|||
}
|
||||
|
||||
native bool TryMove(vector2 newpos, int dropoff, bool missilecheck = false, FCheckPosition tm = null);
|
||||
native bool CheckMove(vector2 newpos, int flags = 0);
|
||||
native void NewChaseDir();
|
||||
native void RandomChaseDir();
|
||||
native bool CheckMissileRange();
|
||||
|
|
|
@ -516,6 +516,15 @@ enum EWarpFlags
|
|||
WARPF_COPYPITCH = 0x8000,
|
||||
};
|
||||
|
||||
// Flags for Actor.CheckMove()
|
||||
|
||||
enum ECheckMoveFlags
|
||||
{
|
||||
PCM_DROPOFF = 1,
|
||||
PCM_NOACTORS = 1 << 1,
|
||||
PCM_NOLINES = 1 << 2,
|
||||
};
|
||||
|
||||
// flags for A_SetPitch/SetAngle/SetRoll
|
||||
enum EAngleFlags
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue