QF_SILENT flag for A_QuakeEx

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1110
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

QF_SILENT flag for A_QuakeEx

Post by Jekyll Grim Payne »

In what I can only assume is a weird oversight, there's no way to produce a silent quake right now. Both A_Quake and A_QuakeEx occupy a sound channel, even if you pass "" or a null sound*. Since it's frequently used to add effect to enemy or weapon attacks, this is a problem (and while specifying a channel for the other sounds does work around it, this should still be a feature).


* Call A_StartSound, then A_Quake(Ex), and the previous sound will be cut off, because A_Quake(Ex) occupies CHAN_BODY.
Last edited by Jekyll Grim Payne on Mon Jun 27, 2022 10:52 am, edited 3 times in total.
User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: QF_SILENT flag for A_QuakeEx

Post by Major Cooke »

Yes you can. Just use "" for the sound parameter. Doesn't play any noise at all.
User avatar
phantombeta
Posts: 2119
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: QF_SILENT flag for A_QuakeEx

Post by phantombeta »

Major Cooke wrote:Yes you can. Just use "" for the sound parameter. Doesn't play any noise at all.
I think this is the issue with that:
Jekyll Grim Payne wrote:Both A_Quake and A_QuakeEx occupy a sound channel, even if you pass "" or a null sound.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: QF_SILENT flag for A_QuakeEx

Post by Nash »

I'm re-opening this (and will send a PR soon).

It has to be a new flag, to not break old mods
User avatar
inkoalawetrust
Posts: 79
Joined: Mon Aug 26, 2019 9:18 pm
Graphics Processor: nVidia with Vulkan support

Re: QF_SILENT flag for A_QuakeEx

Post by inkoalawetrust »

Wouldn't making the function play an empty sound file also work, without needing any additional code ?
User avatar
KynikossDragonn
Posts: 272
Joined: Sat Dec 12, 2020 10:59 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Void Linux
Graphics Processor: Intel (Modern GZDoom)
Location: Independence, KS, USA

Re: QF_SILENT flag for A_QuakeEx

Post by KynikossDragonn »

inkoalawetrust wrote:Wouldn't making the function play an empty sound file also work, without needing any additional code ?
You'd think but:
Jekyll Grim Payne wrote:Both A_Quake and A_QuakeEx occupy a sound channel, even if you pass "" or a null sound.
so in otherwords, it will interrupt any sound playing on the sound channel even if sound name is null.

Return to “Feature Suggestions [GZDoom]”