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

Switch respawn & self-revive keys to custom keybinds #3233

Merged

Conversation

jaj22
Copy link

@jaj22 jaj22 commented Apr 20, 2024

What type of PR is this.

  1. Bug
  2. Change
  3. Enhancement

What have you changed and why?

Antistasi medical respawn (R) and self-revive (H) keys were hard-coded. Now they're not. Also cleaned up some questionable logic that might have caused weird effects if people hit these keys too early.

Please specify which Issue this PR Resolves.

closes #3232

Please verify the following and ensure all checks are completed.

  1. Have you loaded the mission in LAN host?
  2. Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. No
  2. Yes (Please provide further detail below.)

How can the changes be tested?

Start Antistasi without ACE medical and self-revive enabled in parameters. Get yourself killed, for example by using this:
player setPosATL (getPosATL player vectorAdd [0,0,50]);

Try changing the keybinds in the controls menu.

@jaj22 jaj22 added Enhancement New feature or request Review pending labels Apr 20, 2024
@jaj22 jaj22 added this to the 3.6 milestone Apr 20, 2024
@ante185 ante185 requested a review from Tiny-DM April 20, 2024 22:24
@CalebSerafin CalebSerafin self-requested a review May 27, 2024 10:59
Copy link
Member

@CalebSerafin CalebSerafin left a comment

Choose a reason for hiding this comment

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

Okay, the logic looks solid and the stringtable change is good.

It would be nice if we could get rid of the dance for adding and removing event handlers and make it a one-time init. Then the event handlers can do a safety check in their handlers to ensure that the player is indeed unconscious.
But that is beyond the control of fn_unconscious.sqf so the improvement now is okay.

@jaj22
Copy link
Author

jaj22 commented May 27, 2024

Okay, the logic looks solid and the stringtable change is good.

It would be nice if we could get rid of the dance for adding and removing event handlers and make it a one-time init. Then the event handlers can do a safety check in their handlers to ensure that the player is indeed unconscious. But that is beyond the control of fn_unconscious.sqf so the improvement now is okay.

I actually wrote it that way initially, but the incapacitated var isn't enough because it needs to reach that part of the unconscious function before the actions are valid, and incapacitated is set earlier. Could add another flag var, but I decided that I preferred the EH dance.

@Bob-Murphy Bob-Murphy merged commit 5f4349e into official-antistasi-community:unstable May 27, 2024
@Bob-Murphy Bob-Murphy added the Added to changelog Added to changelog label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added to changelog Added to changelog Enhancement New feature or request Ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Make respawn & self-revive keys configurable
3 participants