mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
Preserve wave type when randomizing
This commit is contained in:
parent
b12d141682
commit
528321dce3
4
sfxr.lua
4
sfxr.lua
@ -459,7 +459,11 @@ end
|
|||||||
|
|
||||||
function sfxr.Sound:randomize(seed)
|
function sfxr.Sound:randomize(seed)
|
||||||
if seed then setseed(seed) end
|
if seed then setseed(seed) end
|
||||||
|
|
||||||
|
local wavetype = self.wavetype
|
||||||
self:resetParameters()
|
self:resetParameters()
|
||||||
|
self.wavetype = wavetype
|
||||||
|
|
||||||
if maybe() then
|
if maybe() then
|
||||||
self.repeatspeed = random(0, 1)
|
self.repeatspeed = random(0, 1)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user