mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
Don't let repeatSpeed go over 1.0
This commit is contained in:
parent
e674b0761c
commit
d0a644ecbc
4
sfxr.lua
4
sfxr.lua
@ -459,7 +459,9 @@ end
|
|||||||
function sfxr.Sound:randomize(seed)
|
function sfxr.Sound:randomize(seed)
|
||||||
if seed then setseed(seed) end
|
if seed then setseed(seed) end
|
||||||
self:resetParameters()
|
self:resetParameters()
|
||||||
self.repeatSpeed = random(1, 2)
|
if maybe() then
|
||||||
|
self.repeatSpeed = random(0, 1)
|
||||||
|
end
|
||||||
|
|
||||||
if maybe() then
|
if maybe() then
|
||||||
self.frequency.start = random(-1, 1)^3 + 0.5
|
self.frequency.start = random(-1, 1)^3 + 0.5
|
||||||
|
Loading…
Reference in New Issue
Block a user