From c3ae56028934cc38ce3e08e415712a4ab27c7fbf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 6 Nov 2016 09:22:03 +0100 Subject: [PATCH] - scriptified two more trivial functions. --- src/p_enemy.cpp | 30 +----------------------------- wadsrc/static/zscript/actor.txt | 4 ++-- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 833732008..20a549a51 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -3061,20 +3061,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_XScream) return 0; } -//=========================================================================== -// -// A_ScreamAndUnblock -// -//=========================================================================== - -DEFINE_ACTION_FUNCTION(AActor, A_ScreamAndUnblock) -{ - PARAM_SELF_PROLOGUE(AActor); - CALL_ACTION(A_Scream, self); - A_Unblock(self, true); - return 0; -} - //=========================================================================== // // A_ActiveSound @@ -3086,25 +3072,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_ActiveSound) PARAM_SELF_PROLOGUE(AActor); if (self->ActiveSound) { - S_Sound (self, CHAN_VOICE, self->ActiveSound, 1, ATTN_NORM); + S_Sound(self, CHAN_VOICE, self->ActiveSound, 1, ATTN_NORM); } return 0; } -//=========================================================================== -// -// A_ActiveAndUnblock -// -//=========================================================================== - -DEFINE_ACTION_FUNCTION(AActor, A_ActiveAndUnblock) -{ - PARAM_SELF_PROLOGUE(AActor); - CALL_ACTION(A_ActiveSound, self); - A_Unblock(self, true); - return 0; -} - //--------------------------------------------------------------------------- // // Modifies the drop amount of this item according to the current skill's diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index efdeb3ef1..0365be657 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -130,6 +130,8 @@ class Actor : Thinker native void A_SetRipperLevel(int level) { RipperLevel = level; } void A_SetRipMin(int minimum) { RipLevelMin = minimum; } void A_SetRipMax(int maximum) { RipLevelMax = maximum; } + void A_ScreamAndUnblock() { A_Scream(); A_NoBlocking(); } + void A_ActiveAndUnblock() { A_ActiveSound(); A_NoBlocking(); } void A_SetScale(float scalex, float scaley = 0, int ptr = AAPTR_DEFAULT, bool usezero = false) { @@ -246,8 +248,6 @@ class Actor : Thinker native native void A_M_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class pufftype = "BulletPuff"); - native void A_ScreamAndUnblock(); - native void A_ActiveAndUnblock(); native void A_ActiveSound(); native void A_FastChase();