diff --git a/src/g_heretic/a_hereticartifacts.cpp b/src/g_heretic/a_hereticartifacts.cpp index 169d0e771..f2ad18b2f 100644 --- a/src/g_heretic/a_hereticartifacts.cpp +++ b/src/g_heretic/a_hereticartifacts.cpp @@ -44,18 +44,6 @@ bool AArtiTomeOfPower::Use (bool pickup) // Time bomb ---------------------------------------------------------------- -DEFINE_ACTION_FUNCTION(AActor, A_TimeBomb) -{ - PARAM_SELF_PROLOGUE(AActor); - - self->AddZ(32, false); - self->RenderStyle = STYLE_Add; - self->Alpha = 1.; - P_RadiusAttack (self, self->target, 128, 128, self->DamageType, RADF_HURTSOURCE); - P_CheckSplash(self, 128); - return 0; -} - class AArtiTimeBomb : public AInventory { DECLARE_CLASS (AArtiTimeBomb, AInventory) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 52541a669..abbd057d7 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -6956,7 +6956,8 @@ DEFINE_ACTION_FUNCTION(AActor, AddZ) { PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT(addz); - self->AddZ(addz); + PARAM_BOOL_DEF(moving); + self->AddZ(addz, moving); return 0; } diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 9980d28f5..7b6b63672 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -108,7 +108,7 @@ class Actor : Thinker native native void UnlinkFromWorld(); native bool CanSeek(Actor target); native double AngleTo(Actor target, bool absolute = false); - native void AddZ(float zadd); + native void AddZ(float zadd, bool moving = true); native void SetZ(float z); native vector3 Vec3Offset(float x, float y, float z, bool absolute = false); native vector3 Vec3Angle(float length, float angle, float z = 0, bool absolute = false); diff --git a/wadsrc/static/zscript/heretic/hereticartifacts.txt b/wadsrc/static/zscript/heretic/hereticartifacts.txt index e239748ff..50a25008a 100644 --- a/wadsrc/static/zscript/heretic/hereticartifacts.txt +++ b/wadsrc/static/zscript/heretic/hereticartifacts.txt @@ -80,8 +80,6 @@ Class ActivatedTimeBomb : Actor DeathSound "misc/timebomb"; } - native void A_Timebomb(); - States { Spawn: @@ -91,6 +89,13 @@ Class ActivatedTimeBomb : Actor XPL1 BCDEF 4 BRIGHT; Stop; } + + void A_TimeBomb() + { + AddZ(32, false); + A_SetRenderStyle(1., STYLE_Add); + A_Explode(); + } } diff --git a/wadsrc/static/zscript/hexen/dragon.txt b/wadsrc/static/zscript/hexen/dragon.txt index ed6e86d4a..6082d1c61 100644 --- a/wadsrc/static/zscript/hexen/dragon.txt +++ b/wadsrc/static/zscript/hexen/dragon.txt @@ -291,7 +291,7 @@ class Dragon : Actor void A_DragonCheckCrash() { - if (pos.z < floorz) + if (pos.z <= floorz) { SetStateLabel ("Crash"); } diff --git a/wadsrc/static/zscript/hexen/flechette.txt b/wadsrc/static/zscript/hexen/flechette.txt index 6f7b3a818..c02477064 100644 --- a/wadsrc/static/zscript/hexen/flechette.txt +++ b/wadsrc/static/zscript/hexen/flechette.txt @@ -37,8 +37,6 @@ class FireBomb : Actor DeathSound "FlechetteExplode"; } - native void A_TimeBomb(); - States { Spawn: @@ -50,6 +48,13 @@ class FireBomb : Actor XPL1 BCDEF 4 Bright; Stop; } + + void A_TimeBomb() + { + AddZ(32, false); + A_SetRenderStyle(1., STYLE_Add); + A_Explode(); + } } // Throwing Bomb (Flechette used by Fighter) --------------------------------