mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- Fixed: Player sounds that explicitly use dsempty will now properly silence the sound instead of
looking for a more audible version. SVN r3938 (trunk)
This commit is contained in:
parent
0c7955b550
commit
971eca7d61
2 changed files with 11 additions and 3 deletions
|
@ -519,6 +519,7 @@ int S_AddSoundLump (const char *logicalname, int lump)
|
|||
newsfx.bUsed = false;
|
||||
newsfx.bSingular = false;
|
||||
newsfx.bTentative = false;
|
||||
newsfx.bPlayerSilent = false;
|
||||
newsfx.link = sfxinfo_t::NO_LINK;
|
||||
newsfx.Rolloff.RolloffType = ROLLOFF_Doom;
|
||||
newsfx.Rolloff.MinDistance = 0;
|
||||
|
@ -1110,10 +1111,14 @@ static void S_AddSNDINFO (int lump)
|
|||
case SI_PlayerSound: {
|
||||
// $playersound <player class> <gender> <logical name> <lump name>
|
||||
FString pclass;
|
||||
int gender, refid;
|
||||
int gender, refid, sfxnum;
|
||||
|
||||
S_ParsePlayerSoundCommon (sc, pclass, gender, refid);
|
||||
S_AddPlayerSound (pclass, gender, refid, sc.String);
|
||||
sfxnum = S_AddPlayerSound (pclass, gender, refid, sc.String);
|
||||
if (0 == stricmp(sc.String, "dsempty"))
|
||||
{
|
||||
S_sfx[sfxnum].bPlayerSilent = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1665,7 +1670,9 @@ static int S_LookupPlayerSound (int classidx, int gender, FSoundID refid)
|
|||
// If we're not done parsing SNDINFO yet, assume that the target sound is valid
|
||||
if (PlayerClassesIsSorted &&
|
||||
(sndnum == 0 ||
|
||||
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) && S_sfx[sndnum].link == sfxinfo_t::NO_LINK)))
|
||||
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) &&
|
||||
S_sfx[sndnum].link == sfxinfo_t::NO_LINK &&
|
||||
!S_sfx[sndnum].bPlayerSilent)))
|
||||
{ // This sound is unavailable.
|
||||
if (ingender != 0)
|
||||
{ // Try "male"
|
||||
|
|
|
@ -57,6 +57,7 @@ struct sfxinfo_t
|
|||
WORD bUsed:1;
|
||||
WORD bSingular:1;
|
||||
WORD bTentative:1;
|
||||
WORD bPlayerSilent:1; // This player sound is intentionally silent.
|
||||
|
||||
int LoopStart; // -1 means no specific loop defined
|
||||
|
||||
|
|
Loading…
Reference in a new issue