diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index a62ce0210..ea64c36d3 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -979,6 +979,15 @@ DEFINE_ACTION_FUNCTION(AActor, A_StopSound) return 0; } +DEFINE_ACTION_FUNCTION(AActor, A_SoundVolume) +{ + PARAM_SELF_PROLOGUE(AActor); + PARAM_INT(channel); + PARAM_FLOAT(volume); + S_ChangeSoundVolume(self, channel, static_cast(volume)); + return 0; +} + //========================================================================== // // These come from a time when DECORATE constants did not exist yet and diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 509dd39e3..682c70af6 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -1000,6 +1000,7 @@ class Actor : Thinker native deprecated("2.3") native void A_BulletAttack(); native void A_WolfAttack(int flags = 0, sound whattoplay = "weapons/pistol", double snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, double runspeed = 160.0, class pufftype = "BulletPuff"); native void A_PlaySound(sound whattoplay = "weapons/pistol", int slot = CHAN_BODY, double volume = 1.0, bool looping = false, double attenuation = ATTN_NORM, bool local = false); + native void A_SoundVolume(int slot, double volume); deprecated("2.3") void A_PlayWeaponSound(sound whattoplay) { A_PlaySound(whattoplay, CHAN_WEAPON); } native void A_StopSound(int slot = CHAN_VOICE); // Bad default but that's what is originally was... deprecated("2.3") native void A_PlaySoundEx(sound whattoplay, name slot, bool looping = false, int attenuation = 0);