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

Medical - update setDead to use setHitpointDamage instigator param #8387

Closed
wants to merge 14 commits into from

Conversation

LinkIsGrim
Copy link
Contributor

@LinkIsGrim LinkIsGrim commented Aug 22, 2021

When merged this pull request will:

  • Title.
  • Fixes scoreboard not counting kills etc, Slack discussion.

Forward compatible, but only has full effect with 2.06 profiling branch or 2.08.
Change to enteredStateDeath can be omitted if necessary as it can break current scoreboard functionality (not that it tends to work anyway). Removed frame change to enteredStateDeath, just make it use instigator now.

@jonpas jonpas added the kind/enhancement Release Notes: **IMPROVED:** label Aug 22, 2021
@jonpas jonpas added this to the 3.14.0 milestone Aug 22, 2021

_unit setHitPointDamage ["hitHead", 1, true, _instigator];

_unit setHitPointDamage ["hitHead", _prevDamage, true, _instigator];
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if the instigator parameter makes semantic sense for the second call here to reset the damage.

Unlikely to have meaningful effect, but for the sake of clear code intentions I'd personally leave it off.

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'll just drop the latter two parameters in the second call.

// could delay a frame here to fix the double killed EH, but we lose it being a "native" kill (scoreboard / rating)
[_unit, _causeOfDeath] call EFUNC(medical_status,setDead);
// delay a frame here to fix the double killed EH
[{[_this select 0, _this select 1] call EFUNC(medical_status,setDead)}, [_unit, _causeOfDeath]] call CBA_fnc_execNextFrame;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this should be introduced as don't know if we ever determined possible side effects of this.

There was also another fix for the double killed EH if I recall correctly.

Believe @PabstMirror would be the person to know best

Copy link
Contributor

@PabstMirror PabstMirror Aug 23, 2021

Choose a reason for hiding this comment

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

Fixed: "Killed" Event Handler was sometimes firing twice - FT-T149510

I'm assuming this will make it into 2.06

there also is some CBA code that can probably be removed: https://github.com/CBATeam/CBA_A3/blob/master/addons/xeh/fnc_preInit.sqf#L66

either way I think we should wait for at least 2.06 to be out

@@ -31,7 +31,7 @@ if (!local _patient) exitWith {

if (alive _patient) then {
TRACE_1("Manually killing with setDead",_patient);
[_patient, "buried_alive"] call EFUNC(medical_status,setDead);
[_patient, "buried_alive", _medic] call EFUNC(medical_status,setDead);
Copy link
Member

Choose a reason for hiding this comment

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

Any possible unwanted effects of having medics considered the killer of teammates?

Does this new command variation influence rating (could cause AI to consider them sideEnemy)? @dedmen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does affects rating, per Dedmen's comment in A3 discord, #community_wiki.

Copy link
Member

Choose a reason for hiding this comment

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

As much as I like the idea to track mercy kills, we probably shouldn't do this then as it could cause players to be considered hostile. We could add rating every time, but these also wouldn't be distinguished from legitimate teamkills in the scoreboard which makes it less useful.

@PabstMirror PabstMirror modified the milestones: 3.14.0, Ongoing Aug 23, 2021
@PabstMirror PabstMirror added the target/next-arma Requires something in arma dev branch label Aug 23, 2021
Counserf and others added 7 commits August 28, 2021 12:42
* Translation - Russian

* Update addons/medical_treatment/stringtable.xml

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Zeus - Move to CBA settings

* Zeus - Update BI module functions to 2.04 versions
* Update code guidelines for script_component

* Update contributing documents for pull requests

- Reflect true attribution practices
- Reflect true merge process (this changed a long time ago)

* Remove listed maintainer from component readmes

We have almost never used these and serve as a source of confusion for
new contributors.
@LinkIsGrim
Copy link
Contributor Author

Need stuff from #8373 for a fix. Rebasing

@LinkIsGrim
Copy link
Contributor Author

I can't Git.

@LinkIsGrim LinkIsGrim closed this Aug 28, 2021
LinkIsGrim added a commit to LinkIsGrim/ACE3 that referenced this pull request Aug 28, 2021
I'm dumb.
PabstMirror added a commit that referenced this pull request Nov 15, 2021
#8397)

* Redoing this

* Revert "Redoing this"

This reverts commit 80ff709.

* Do this properly

* Update fnc_handleKilled.sqf

* use setDead function directly

* Handle scripted camera

* redo #8387

I'm dumb.

* try this

* if construct outside of ctrlSetEventHandler

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* tweak disableUserInput / handleKilled

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
acemod#8397)

* Redoing this

* Revert "Redoing this"

This reverts commit 80ff709.

* Do this properly

* Update fnc_handleKilled.sqf

* use setDead function directly

* Handle scripted camera

* redo acemod#8387

I'm dumb.

* try this

* if construct outside of ctrlSetEventHandler

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* tweak disableUserInput / handleKilled

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@LinkIsGrim LinkIsGrim removed this from the Ongoing milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:** target/next-arma Requires something in arma dev branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants