From f1db9ac9b947374990ad864bce9a845288a2c6f0 Mon Sep 17 00:00:00 2001 From: Dylan <28832631+DARwins1@users.noreply.github.com> Date: Tue, 8 Aug 2023 22:27:32 -0700 Subject: [PATCH] Fix "Unit Destroyed" audio not playing properly Fixed a mistake (typo?) in the audio_QueueTrackMinDelayPos() function that prevented the "Unit Destroyed" audio from playing after 5 seconds have passed. --- lib/sound/audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sound/audio.cpp b/lib/sound/audio.cpp index c7352a51ea6..e79c3d342da 100644 --- a/lib/sound/audio.cpp +++ b/lib/sound/audio.cpp @@ -446,7 +446,7 @@ void audio_QueueTrackMinDelayPos(SDWORD iTrack, UDWORD iMinDelay, SDWORD iX, SDW // Determine if at least iMinDelay time has passed since the last time this track was played iDelay = sound_GetGameTime() - sound_GetTrackTimeLastFinished(iTrack); - if (iDelay > iMinDelay) + if (iDelay < iMinDelay) { return; }