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

Prevent treatment animation on dead bodies #6524

Merged
merged 3 commits into from
Aug 12, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/medical_treatment/functions/fnc_treatment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if (IS_UNCONSCIOUS(_target) && EGVAR(medical,allowUnconsciousAnimationOnTreatmen

private _isSelf = _caller isEqualTo _target;

if (!_isSelf && {vehicle _target == _target} && {_patientAnim != ""}) then {
if (!_isSelf && {vehicle _target == _target} && {_patientAnim != ""} && {alive _target}) then {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably do an isAwake check instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

May only apply to actually dead bodies, not ragdolls?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe, but otherwise it becomes another easy way to tell if a unit is not alive

Copy link
Member Author

Choose a reason for hiding this comment

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

To be honest I've never actually noticed treatment animations before 😄 Maybe that means they're doing their job though

I'm in favour of an isAwake check 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Treatment animations have always been disabled by default iirc. Due to some very valid reasons documented in a pr way back. Or maybe just slack?

if IS_UNCONSCIOUS(_target) then {
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
} else {
Expand Down