From 4483d665d42689b10d9888b837a17b7335fc2b61 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 12 Aug 2017 13:55:33 +0200 Subject: [PATCH] - fixed: FastProjectile's movement code was missong a portal check. --- src/p_mobj.cpp | 8 ++++++++ wadsrc/static/zscript/actor.txt | 1 + wadsrc/static/zscript/shared/fastprojectile.txt | 1 + 3 files changed, 10 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index b49be43d8..daa8b5aa4 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4036,6 +4036,14 @@ void AActor::CheckPortalTransition(bool islinked) if (islinked && moved) LinkToWorld(&ctx); } +DEFINE_ACTION_FUNCTION(AActor, CheckPortalTransition) +{ + PARAM_SELF_PROLOGUE(AActor); + PARAM_BOOL_DEF(linked); + self->CheckPortalTransition(linked); + return 0; +} + // // P_MobjThinker // diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 048ba0759..27ce423a8 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -518,6 +518,7 @@ class Actor : Thinker native native clearscope int GetRenderStyle() const; native clearscope bool CheckKeys(int locknum, bool remote, bool quiet = false); native clearscope Inventory FirstInv() const; + protected native void CheckPortalTransition(bool linked = true); native clearscope string GetTag(string defstr = "") const; native void SetTag(string defstr = ""); diff --git a/wadsrc/static/zscript/shared/fastprojectile.txt b/wadsrc/static/zscript/shared/fastprojectile.txt index a0fa1a91c..1bed8cba2 100644 --- a/wadsrc/static/zscript/shared/fastprojectile.txt +++ b/wadsrc/static/zscript/shared/fastprojectile.txt @@ -156,6 +156,7 @@ class FastProjectile : Actor ExplodeMissile (NULL, NULL); return; } + CheckPortalTransition(); if (changexy && ripcount <= 0) { ripcount = count >> 3;