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

Improve unconscious volume handling #6455

Merged
merged 5 commits into from Jul 20, 2018
Merged

Conversation

kymckay
Copy link
Member

@kymckay kymckay commented Jul 20, 2018

When merged this pull request will:

  • Lower the player's hearing when they go unconscious (both game sounds and addon local/radio voices).
    • Perhaps this should only affect voices?
  • Re-evaluate player's ability to talk and hear upon changing unit
    • Fix potential for players to be able to talk if they transition into an already unconscious AI unit that was previously local to dedicated/headless.
    • Fix potential for players to respawn and not be able to hear or talk.
      • We should probably be resetting these on death anyway because players could be in an external spectator system during that time.
    • This also removes the large number of variables being set on AI and never used.

Since this wasn't being handled on dedicated/headless zeus or other
could be changed into an unconscious unit and then start speaking with
the radio
@kymckay kymckay added kind/enhancement Release Notes: **IMPROVED:** status/needs-testing kind/bug-fix Release Notes: **FIXED:** labels Jul 20, 2018
@kymckay kymckay added this to the Medical Rewrite milestone Jul 20, 2018
@kymckay kymckay added this to Open in Medical Focus Feature via automation Jul 20, 2018
@kymckay kymckay requested a review from thojkooi July 20, 2018 12:01
@kymckay
Copy link
Member Author

kymckay commented Jul 20, 2018

I've added a needs testing tag because I don't know how the lower volume feels in terms of UX.

I also need to consider the best way to reset volume and voice upon death. I'm thinking we add an event that fires upon entering the death state in statemachine before we kill the unit?

// Toggle unconscious player's ability to talk in radio addons
_unit setVariable ["tf_voiceVolume", [1, 0] select _unconscious, true];
_unit setVariable ["tf_unable_to_use_radio", _unconscious, true];
_unit setVariable ["acre_sys_core_isDisabled", _unconscious, true];
Copy link
Member Author

Choose a reason for hiding this comment

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

@dedmen @jonpas

Do ACRE/TFAR need these variables to be publicly set to prevent the local player from talking? I suspect the old code was only doing it to handle the potential for the player to change unit, but they're now updated whenever that happens anyway.

Copy link
Contributor

@dedmen dedmen Jul 20, 2018

Choose a reason for hiding this comment

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

voiceVolume yes.. sadly. It influences the total volume. Also voice over Radio/Intercom/Direct/etc
tf_unable_to_use_radio no. Local only. Aka local to _unit.
Btw do we have anything like a muffled hearing when unconscious?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it appears it needs to be global.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dedmen In this PR I lower the hearing volume while unconscious, but muffled would be good to add.

and thanks guys!

@kymckay kymckay moved this from Open to In Progress in Medical Focus Feature Jul 20, 2018
Copy link
Contributor

@thojkooi thojkooi left a comment

Choose a reason for hiding this comment

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

Actual values will need to be tweaked based on user feedback. I'd merge this and adjust those later.

@kymckay kymckay merged commit 3b57474 into medical-rewrite Jul 20, 2018
Medical Focus Feature automation moved this from In Progress to Completed Jul 20, 2018
@kymckay kymckay deleted the rw-unconscious-vol branch July 20, 2018 21:23
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Lower player hearing upon entering unconscious
* Fix potential for unconscious units to use radio
* Evaluate player's volume upon changing unit
* Reset player volume on death
* Remove unnecessary public variable
@PabstMirror PabstMirror modified the milestones: Medical Rewrite, 3.13.0 Dec 30, 2019
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/enhancement Release Notes: **IMPROVED:** status/needs-testing
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants