[not a bug] $limit no longer works in SNDINFO?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Jekyll Grim Payne
 
 
Posts: 1071
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

[not a bug] $limit no longer works in SNDINFO?

Post by Jekyll Grim Payne »

I don't know how long it's been true but I can't make $limit work.

Code: Select all

$random bullet/metal { bmetal1 bmetal2 bmetal3 bmetal4 bmetal5 }
bmetal1		"sounds/impacts/bullet-metal1.ogg"
bmetal2		"sounds/impacts/bullet-metal2.ogg"
bmetal3		"sounds/impacts/bullet-metal3.ogg"
bmetal4		"sounds/impacts/bullet-metal4.ogg"
bmetal5		"sounds/impacts/bullet-metal5.ogg"

$limit bmetal1 1
$limit bmetal2 1
$limit bmetal3 1
$limit bmetal4 1
$limit bmetal5 1
$limit bullet/metal 1
As you can see I defined it both for the randomized sequence and for the sounds themselves, just to be sure, but there's no effect, at least no effect I'd expect: the sound is produced by bulletpuffs and I can clearly hear as many instances as there are bulletpuffs. I can create a reproducible example pk3 but maybe I'm missing something really obvious here.
Last edited by Jekyll Grim Payne on Mon Jan 14, 2019 3:07 am, edited 1 time in total.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: $limit no longer works in SNDINFO?

Post by Enjay »

It's pretty easy to demonstrate that $limit is still working by loading the following in a SNDINFO

Code: Select all

$limit weapons/plasmaf 1
and then firing the plasma gun. The effect is very obvious (especially if you run forwards while firing).

I suspect the problem that you are coming up against is that (from memory) $limit does not limit the randomised name (in your case bullet/metal).

I can be used to limit the individual sounds within the randomisation (bmetal1, 2, 3 etc) and that probably is working. However, if you are producing a bunch of bulletpuffs at one time, each one is choosing their sound from a choice of 5, so with a lot of bullet puffs appearing at once, you could easily have 5 sounds playing at the same time and that might seem like $limit is not working.

I guess that it all depends what you are trying to do, but it may be possible to limit the number of sound instances by taking a different approach to the logic of how your sound is being played.

However, $limit itself seems to be working as intended.
User avatar
Jekyll Grim Payne
 
 
Posts: 1071
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: [not a bug] $limit no longer works in SNDINFO?

Post by Jekyll Grim Payne »

Wow, I feel stupid. I think that's what's happening indeed. Thanks!
Post Reply

Return to “Closed Bugs [GZDoom]”