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 Engine - Fix unloading dead units in vehicles and handle deleted units vehicles #9283

Merged
merged 8 commits into from Aug 2, 2023

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Jul 22, 2023

ref #7959

  • fix unloading dead units
  • fix position setting when unloading (non-dead units will now unload near you)
  • lock seat when mounted unit dies
  • unlock seat when unit is deleted

@LinkIsGrim
Copy link
Contributor

FUNC(unloadPersonLocal) needs to be switched to objectParent as well, that's why it's failing.

@PabstMirror PabstMirror added this to the 3.16.0 milestone Jul 22, 2023
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Jul 22, 2023
@PabstMirror PabstMirror changed the title Medical Engine - Unlock when dead Medical Engine - Fix seat being locked when unconscious unit dies Jul 22, 2023
@PabstMirror PabstMirror marked this pull request as ready for review July 22, 2023 18:17
addons/common/functions/fnc_unloadPersonLocal.sqf Outdated Show resolved Hide resolved
addons/common/functions/fnc_unloadPersonLocal.sqf Outdated Show resolved Hide resolved
addons/medical_engine/XEH_postInit.sqf Outdated Show resolved Hide resolved
@LinkIsGrim
Copy link
Contributor

LinkIsGrim@179957c should handle everything.

@PabstMirror PabstMirror changed the title Medical Engine - Fix seat being locked when unconscious unit dies Medical Engine - Fix unloading dead units in vehicles and handle deleted units vehicles Jul 31, 2023
["ace_killed", { // global event
params ["_unit"];
TRACE_3("unit Killed",_unit,objectParent _unit,local _unit);
if (!isNull objectParent _unit && {local objectParent _unit}) exitWith {
Copy link
Contributor

Choose a reason for hiding this comment

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

We might be able to switch this to just

Suggested change
if (!isNull objectParent _unit && {local objectParent _unit}) exitWith {
if (local objectParent _unit) exitWith {

as local objNull seems to always be false, but it's a minuscule gain and less readable IMO.

@LinkIsGrim LinkIsGrim merged commit 6fb9161 into master Aug 2, 2023
5 checks passed
@PabstMirror PabstMirror deleted the deadlock branch August 2, 2023 06:02
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:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants