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

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

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

Postby Jekyll Grim Payne » Sun Jan 13, 2019 12:11 pm

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

Code: Select allExpand view
$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 4:07 am, edited 1 time in total.
User avatar
Jekyll Grim Payne
Joined: 21 Jul 2008

Re: $limit no longer works in SNDINFO?

Postby Enjay » Sun Jan 13, 2019 1:25 pm

It's pretty easy to demonstrate that $limit is still working by loading the following in a SNDINFO
Code: Select allExpand view
$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
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
Joined: 15 Jul 2003
Location: Scotland

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

Postby Jekyll Grim Payne » Mon Jan 14, 2019 4:07 am

Wow, I feel stupid. I think that's what's happening indeed. Thanks!
User avatar
Jekyll Grim Payne
Joined: 21 Jul 2008

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests