Skip to content

Commit 8e56517

Browse files
Fix replace sound infinite loop (#1090)
1 parent 79dc8ee commit 8e56517

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/game_object.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,10 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
570570
if replace_sound.args then
571571
local args = replace_sound.args
572572
if type(args) == 'function' then args = args(sound, { pitch = per, volume = vol }) end
573-
play_sound(sound.sound_code, args.pitch, args.volume)
573+
play_sound_ref(sound.sound_code, args.pitch, args.volume)
574574
if not args.continue_base_sound then rt = true end
575575
else
576-
play_sound(sound.sound_code, per, vol)
576+
play_sound_ref(sound.sound_code, per, vol)
577577
rt = true
578578
end
579579
if replace_sound.times > 0 then replace_sound.times = replace_sound.times - 1 end

0 commit comments

Comments
 (0)