mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
- elimintated all cases from the ZScript code where channel indices and flags were combined into one parameter and removed all remnants of CHAN_PICKUP.
This commit is contained in:
parent
d79c6c1c0a
commit
d08bb93b84
5 changed files with 17 additions and 8 deletions
|
@ -20,8 +20,6 @@ enum EChanFlag
|
|||
CHANF_AREA = 128, // Sound plays from all around. Only valid with sector sounds.
|
||||
CHANF_LOOP = 256,
|
||||
|
||||
CHANF_PICKUP = CHANF_MAYBE_LOCAL,
|
||||
|
||||
CHANF_NONE = 0,
|
||||
CHANF_IS3D = 1, // internal: Sound is 3D.
|
||||
CHANF_EVICTED = 2, // internal: Sound was evicted.
|
||||
|
|
|
@ -192,7 +192,6 @@ struct FSoundChan : public FISoundChannel
|
|||
// CHAN_VOICE is for oof, sight, or other voice sounds
|
||||
// CHAN_ITEM is for small things and item pickup
|
||||
// CHAN_BODY is for generic body sounds
|
||||
// CHAN_PICKUP can optionally be set as a local sound only for "compatibility"
|
||||
|
||||
enum EChannel
|
||||
{
|
||||
|
|
|
@ -124,7 +124,7 @@ class Lightning : Actor
|
|||
if ((!thing.player && !thing.bBoss) || !(Level.maptime & 1))
|
||||
{
|
||||
thing.DamageMobj(self, target, 3, 'Electric');
|
||||
A_PlaySound(AttackSound, CHAN_WEAPON|CHAN_NOSTOP, 1, false);
|
||||
A_StartSound(AttackSound, CHAN_WEAPON, CHANF_NOSTOP, 1, false);
|
||||
if (thing.bIsMonster && random[LightningHit]() < 64)
|
||||
{
|
||||
thing.Howl ();
|
||||
|
|
|
@ -1046,6 +1046,7 @@ class Inventory : Actor
|
|||
{
|
||||
double atten;
|
||||
int chan;
|
||||
int flags = 0;
|
||||
|
||||
if (bNoAttenPickupSound)
|
||||
{
|
||||
|
@ -1065,13 +1066,15 @@ class Inventory : Actor
|
|||
|
||||
if (toucher != NULL && toucher.CheckLocalView())
|
||||
{
|
||||
chan = CHAN_PICKUP|CHAN_NOPAUSE;
|
||||
chan = CHAN_ITEM;
|
||||
flags = CHANF_NOPAUSE | CHANF_MAYBE_LOCAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
chan = CHAN_PICKUP;
|
||||
chan = CHAN_ITEM;
|
||||
flags = CHANF_MAYBE_LOCAL;
|
||||
}
|
||||
toucher.A_PlaySound(PickupSound, chan, 1, false, atten);
|
||||
toucher.A_StartSound(PickupSound, chan, flags, 1, false, atten);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -418,10 +418,19 @@ enum ESoundFlags
|
|||
CHAN_UI = 32,
|
||||
CHAN_NOPAUSE = 64,
|
||||
CHAN_LOOP = 256,
|
||||
CHAN_PICKUP = (CHAN_ITEM|CHAN_MAYBE_LOCAL),
|
||||
CHAN_PICKUP = (CHAN_ITEM|CHAN_MAYBE_LOCAL), // Do not use this with A_StartSound! It would not do what is expected.
|
||||
CHAN_NOSTOP = 4096,
|
||||
CHAN_OVERLAP = 8192,
|
||||
|
||||
// Same as above, with an F appended to allow better distinction of channel and channel flags.
|
||||
CHANF_LISTENERZ = 8,
|
||||
CHANF_MAYBE_LOCAL = 16,
|
||||
CHANF_UI = 32,
|
||||
CHANF_NOPAUSE = 64,
|
||||
CHANF_LOOP = 256,
|
||||
CHANF_NOSTOP = 4096,
|
||||
CHANF_OVERLAP = 8192,
|
||||
|
||||
};
|
||||
|
||||
// sound attenuation values
|
||||
|
|
Loading…
Reference in a new issue