Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Unit Destroyed" audio not playing properly #3336

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

DARwins1
Copy link
Member

@DARwins1 DARwins1 commented Aug 9, 2023

Fixed a mistake (typo?) in the audio_QueueTrackMinDelayPos() function that prevented the "Unit Destroyed" audio from playing after 5 seconds have passed from the start of the game.
Now the audio alert will play properly when one of the player's units die, at most once every 5 seconds. NOTE: The "Unit Destroyed" message may not play once for every unit lost if multiple units die within 5 seconds, but this seems to be intentional behavior. All this PR does is make the function actually work properly.

Fixed a mistake (typo?) in the audio_QueueTrackMinDelayPos() function that prevented the "Unit Destroyed" audio from playing after 5 seconds have passed.
@KJeff01 KJeff01 added this to the 4.4.0-beta1 milestone Aug 9, 2023
@KJeff01
Copy link
Member

KJeff01 commented Aug 9, 2023

Probably a copy-paste error. In audio_QueueTrackMinDelay() there is this instead: if (!(iDelay > iMinDelay))

For consistency and clarity you can tweak the other one to be if (iDelay < iMinDelay) also.

@KJeff01 KJeff01 merged commit fdc36c9 into Warzone2100:master Aug 10, 2023
37 checks passed
@DARwins1 DARwins1 deleted the dr-9 branch August 10, 2023 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants