-
Notifications
You must be signed in to change notification settings - Fork 738
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
Hide advFatigue bar on map / spectator #4655
Conversation
Should do vehicles as well. |
Added, will close #4424 |
[ACE_player, objNull] call FUNC(handlePlayerChanged); | ||
}; | ||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; | ||
["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; |
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.
The handlePlayerChanged
function needs to run at least once. If the unit EH triggered already, this will completly break AF. Would recommend to just revert this to how it was.
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.
Third arg for addPlayerEventHandler was recently added to do the same thing:
_applyRetroactively - Call function immediately if player is defined already (optional, default: false) <BOOL>
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, I see. That works then.
@@ -13,6 +13,11 @@ params ["_stamina"]; | |||
|
|||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; | |||
|
|||
if ((vehicle ACE_player) != ACE_player) exitWith { // Hide when mounted |
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.
Why not use the vehicle player EH?
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.
I think we're still going to need the if statement here or it will be overwriten
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.
You could do it just like in the visibleMap EH. Both need checks if both conditions apply. I'd rather keep all the hiding/showing in one place.
Thank you @PabstMirror! |
No description provided.