Skip to content

Commit

Permalink
Fix "Unit Destroyed" audio not playing properly
Browse files Browse the repository at this point in the history
Fixed a mistake (typo?) in the audio_QueueTrackMinDelayPos() function that prevented the "Unit Destroyed" audio from playing after 5 seconds have passed.
  • Loading branch information
DARwins1 committed Aug 9, 2023
1 parent de8cef4 commit f1db9ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sound/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f1db9ac

Please sign in to comment.