-
Notifications
You must be signed in to change notification settings - Fork 739
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
Medical - Improve injured sound by exiting the function earlier if no player is around #7521
Medical - Improve injured sound by exiting the function earlier if no player is around #7521
Conversation
This does not seem like a good idea to me. |
Co-Authored-By: commy2 <commy-2@gmx.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not work as expected.
If any player is inside the area then the _targets will not be empty. This also handle the case where player is inside a vehicle or _unit is a player.
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
I don't get the handling z part. We don't want to mute all moans if you are 70 or whatever meters above the ground. Just leave the z out and it will handle all untis in the cylinder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a distance check between the audio source and a player e.g. player in a helicopter, 100m above a target, there is no reason to send the say3d event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I notice
ace_medical_feedback_fnc_playInjuredSound
take an average time of execution around 300µs (~1000 call) even when no player is around the injured AI.The idea of this PR is to reduce this value by exiting the function earlier.
When merged this pull request will:
ace_medical_feedback_fnc_playInjuredSound
earlier if no player is around