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

Hide advFatigue bar on map / spectator #4655

Merged
merged 4 commits into from
Nov 13, 2016
Merged

Hide advFatigue bar on map / spectator #4655

merged 4 commits into from
Nov 13, 2016

Conversation

PabstMirror
Copy link
Contributor

No description provided.

@PabstMirror PabstMirror added the kind/cleanup Release Notes: **CHANGED:** label Nov 10, 2016
@PabstMirror PabstMirror added this to the 3.9.0 milestone Nov 10, 2016
@BaerMitUmlaut
Copy link
Member

Should do vehicles as well.

@PabstMirror PabstMirror modified the milestones: 3.8.2, 3.9.0 Nov 13, 2016
@PabstMirror PabstMirror added kind/bug-fix Release Notes: **FIXED:** status/cherrypick labels Nov 13, 2016
@PabstMirror
Copy link
Contributor Author

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;
Copy link
Member

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.

Copy link
Contributor Author

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>

Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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.

@BaerMitUmlaut BaerMitUmlaut merged commit d40c3fd into master Nov 13, 2016
@BaerMitUmlaut BaerMitUmlaut deleted the fixStamBar branch November 13, 2016 17:06
@BaerMitUmlaut
Copy link
Member

Thank you @PabstMirror!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:** kind/cleanup Release Notes: **CHANGED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants