-
Notifications
You must be signed in to change notification settings - Fork 736
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
Exit addEarplugs if earplugs are used #1759
Conversation
|
||
_unit = _this select 0; | ||
// Exit if soldier has earplugs already in (persistence scenarios) | ||
if (FUNC(hasEarPlugsIn)) exitWith {}; |
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.
"Error if: Type code, expected Bool"
probably should be:
if ([_unit] call FUNC(hasEarPlugsIn)) exitWith {};
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.
Oh crap, forgot to commit after fixing that! 😁
wouldn't removing earplugs on respawn be a better solution ? |
You mean by a mission/persistence system used? Yes of course, but this is not the only point of the PR. Right now if you have earplugs in already it will add another, which you'd normally just throw on the ground. |
Would it be ok to add an ACE_Settings setting to disable that automatic addition? |
Conflicts: addons/hearing/functions/fnc_addEarPlugs.sqf
Resolved conflicts and combined both PRs for performance. |
Exit addEarplugs if earplugs are used
Thanks! |
This solves duplicating Earplugs in persistence scenarios (eg. persistence mods). It will still add the earplugs if none are equipped, but in terms of persistence you would normally equip them and be done with it anyways.