From 60d93008ba53edb1e26562893f31bff5869935ae Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Wed, 16 Nov 2016 11:47:45 -0600 Subject: [PATCH] Exported TryMove. --- src/p_map.cpp | 8 ++++++++ wadsrc/static/zscript/actor.txt | 1 + 2 files changed, 9 insertions(+) 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);