Clean up trailing whitespace in audio crossfade function

This commit is contained in:
PeaAshMeter 2026-02-12 00:01:43 +03:00
parent 00f1c7f7ee
commit 2fc9bdf6a6

View File

@ -40,7 +40,7 @@ end
--- @param ms number? in milliseconds
function audio:crossfade(from, to, ms)
print("[Audio]: Triggered crossfade")
-- Stop previous 'from' if it's dangling to avoid leaks
if self.from and self.from ~= from and self.from ~= to then
self.from:stop()
@ -54,7 +54,7 @@ function audio:crossfade(from, to, ms)
-- Reuse fader object to allow task cancellation
if not self.fader then self.fader = { value = 0 } end
self.fader.value = 0
task.tween(self.fader, { value = 1 }, ms or 1000, ease.easeOutCubic)(function()
if self.from then
self.from:setVolume(0)