diff --git a/src/p_map.cpp b/src/p_map.cpp index d7bffa5895..b904dc1d45 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2498,6 +2498,14 @@ bool P_TryMove(AActor *thing, const DVector2 &pos, return P_TryMove(thing, pos, dropoff, onfloor, tm); } +DEFINE_ACTION_FUNCTION(AActor, TryMove) +{ + PARAM_SELF_PROLOGUE(AActor); + PARAM_FLOAT_DEF(x); + PARAM_FLOAT_DEF(y); + PARAM_INT(dropoff); + ACTION_RETURN_BOOL(P_TryMove(self, DVector2(x, y), dropoff)); +} //========================================================================== diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index f28045764e..9980d28f5e 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -97,6 +97,7 @@ class Actor : Thinker native native bool CheckSight(Actor target, int flags = 0); native bool HitFriend(); native bool MonsterMove(); + native bool TryMove(vector2 newpos, int dropoff); native void NewChaseDir(); native bool CheckMissileRange(); native bool SetState(state st, bool nofunction = false);