by Player701 » Fri Oct 09, 2020 12:11 am
Hmm, I can confirm the bug too. It is present in 4.4.2 and probably in much earlier versions as well. I think I first encountered it quite a while ago (a couple years maybe), but I'm not sure why I didn't report it back then. Probably because I thought that mdk/kill monsters was supposed to work that way... yeah, I know, silly. But I guess I thought, since they're cheat codes, why not? (Not trying to imply that this isn't actually a bug, of course)
Upd: This bug affects the Arachnotron too. Both the Arachnotron and the Spider Mastermind call A_Scream in the very first state of their death sequences. The same goes for BossBrain, and it's also affected by the bug (kill monsters doesn't work for it but mdk does).
Upd2: A_Scream actually does get called, this can be easily seen by adding a console message to the method body. Interestingly enough, binding a key to mdk and using it
without opening the console makes the sound play normally as well. Same if kill monsters is bound to a key and used.
Upd3: And this is why it happens:
Code: Select all
// sound is paused and a non-looped sound is being started.
// Such a sound would play right after unpausing which wouldn't sound right.
if (!(chanflags & CHANF_LOOP) && !(chanflags & (CHANF_UI|CHANF_NOPAUSE)) && SoundPaused)
{
return NULL;
}
Hmm, I can confirm the bug too. It is present in 4.4.2 and probably in much earlier versions as well. I think I first encountered it quite a while ago (a couple years maybe), but I'm not sure why I didn't report it back then. Probably because I thought that mdk/kill monsters was supposed to work that way... yeah, I know, silly. But I guess I thought, since they're cheat codes, why not? (Not trying to imply that this isn't actually a bug, of course)
[b]Upd:[/b] This bug affects the Arachnotron too. Both the Arachnotron and the Spider Mastermind call A_Scream in the very first state of their death sequences. The same goes for BossBrain, and it's also affected by the bug (kill monsters doesn't work for it but mdk does).
[b]Upd2:[/b] A_Scream actually does get called, this can be easily seen by adding a console message to the method body. Interestingly enough, binding a key to mdk and using it [u]without[/u] opening the console makes the sound play normally as well. Same if kill monsters is bound to a key and used.
[b]Upd3:[/b] [url=https://github.com/coelckers/gzdoom/blob/c65f707a206409f971b6350a9b0fcc39c6d76a85/src/common/audio/sound/s_sound.cpp#L526-L531]And this is why it happens[/url]:
[quote][code]// sound is paused and a non-looped sound is being started.
// Such a sound would play right after unpausing which wouldn't sound right.
if (!(chanflags & CHANF_LOOP) && !(chanflags & (CHANF_UI|CHANF_NOPAUSE)) && SoundPaused)
{
return NULL;
}[/code][/quote]