mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-17 17:41:23 +00:00
Added Actor.A_SoundVolume(int slot, double volume) function to ZScript
https://forum.zdoom.org/viewtopic.php?t=57594
This commit is contained in:
parent
77faab5a75
commit
ca55d8993f
2 changed files with 10 additions and 0 deletions
|
@ -979,6 +979,15 @@ DEFINE_ACTION_FUNCTION(AActor, A_StopSound)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(AActor, A_SoundVolume)
|
||||||
|
{
|
||||||
|
PARAM_SELF_PROLOGUE(AActor);
|
||||||
|
PARAM_INT(channel);
|
||||||
|
PARAM_FLOAT(volume);
|
||||||
|
S_ChangeSoundVolume(self, channel, static_cast<float>(volume));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// These come from a time when DECORATE constants did not exist yet and
|
// These come from a time when DECORATE constants did not exist yet and
|
||||||
|
|
|
@ -1000,6 +1000,7 @@ class Actor : Thinker native
|
||||||
deprecated("2.3") native void A_BulletAttack();
|
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<Actor> pufftype = "BulletPuff");
|
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<Actor> 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_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); }
|
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...
|
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);
|
deprecated("2.3") native void A_PlaySoundEx(sound whattoplay, name slot, bool looping = false, int attenuation = 0);
|
||||||
|
|
Loading…
Reference in a new issue