From e39bf9eaeb7544762d65be41c1571a612c5595e3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Oct 2016 11:38:02 +0200 Subject: [PATCH] - made the bounce flags accessible after verifying that the code works for 16 bit variables. - fixed a deprecation warning with the Heresiarch by replacing A_ChangeFlag. --- wadsrc/static/zscript/constants.txt | 2 +- wadsrc/static/zscript/hexen/heresiarch.txt | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/wadsrc/static/zscript/constants.txt b/wadsrc/static/zscript/constants.txt index 9792ec230..41c4bfec9 100644 --- a/wadsrc/static/zscript/constants.txt +++ b/wadsrc/static/zscript/constants.txt @@ -1,5 +1,5 @@ // for flag changer functions. -const int FLAG_NO_CHANGE = -1; +const FLAG_NO_CHANGE = -1; // Flags for A_PainAttack enum EPainAttackFlags diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index 6ffc11b3b..7d3ba63a5 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -96,6 +96,12 @@ class SorcBall native native void A_SorcBallOrbit(); native void A_SorcBallPop(); native void A_BounceCheck (); + + void A_SorcBallExplode() + { + bNOBOUNCESOUND = true; + A_Explode(255, 255); + } } // First ball (purple) - fires projectiles ---------------------------------- @@ -112,8 +118,7 @@ class SorcBall1 : SorcBall native SBMP B 2 A_BounceCheck; Wait; Death: - SBS4 D 0 A_ChangeFlag("NOBOUNCESOUND", 1); - SBS4 D 5 A_Explode(255,255); + SBS4 D 5 A_SorcBallExplode; SBS4 E 5; SBS4 FGH 6; Stop; @@ -135,8 +140,7 @@ class SorcBall2 : SorcBall native SBMB B 2 A_BounceCheck; Wait; Death: - SBS4 D 0 A_ChangeFlag("NOBOUNCESOUND", 1); - SBS3 D 5 A_Explode(255,255); + SBS3 D 5 A_SorcBallExplode; SBS3 E 5; SBS3 FGH 6; Stop; @@ -157,8 +161,7 @@ class SorcBall3 : SorcBall native SBMG B 2 A_BounceCheck; Wait; Death: - SBS4 D 0 A_ChangeFlag("NOBOUNCESOUND", 1); - SBS3 D 5 A_Explode(255,255); + SBS3 D 5 A_SorcBallExplode; SBS3 E 5; SBS3 FGH 6; Stop;