Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Field Rations - Disable for virtual units, Hide HUD in feature cameras #206

Merged
merged 2 commits into from
Feb 23, 2020

Conversation

mharis001
Copy link
Member

When merged this pull request will:

@mharis001 mharis001 added this to the 3.5.1 milestone Jan 4, 2020
@@ -66,7 +67,7 @@ _player setVariable [QGVAR(hunger), _hunger, _doSync];
[_player, _thirst, _hunger] call FUNC(handleEffects);

// Handle showing/updating or hiding of HUD
if (_thirst > GVAR(hudShowLevel) || {_hunger > GVAR(hudShowLevel)} || {GVAR(hudInteractionHover)}) then {
if (!ACEGVAR(common,OldIsCamera) && {_thirst > GVAR(hudShowLevel) || {_hunger > GVAR(hudShowLevel)} || {GVAR(hudInteractionHover)}}) then {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just use feature camera from CBA? I forget how this variable is linked to it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is variable is true if a CBA registered feature camera is active, false otherwise. reference

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just for backwards compatibility though, should we really use that variable here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could change this to either:

  • call CBA_fnc_getActiveFeatureCamera == ""
  • Add a "featureCamera" event that similarly keeps a variable updated

I think the second might be a bit better since this runs every second.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, checking a gvar is faster than doing the _fnc call

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For that, it's fine to use the ACE3 one. But that could and probably should be part of CBA really.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cba also has cba_events_oldFeatureCamera
but that's a string instead of a bool

@jonpas jonpas merged commit e92a3e7 into master Feb 23, 2020
@jonpas jonpas deleted the field-rations-virtual-units branch February 23, 2020 00:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field Rations: Spectator also has hunger and thirst Field Rations: Zeus also has hunger and thirst
3 participants