Remove patient treatment animations (#6524)

* Prevent treatment animation on dead bodies

This was causing bodies to glitch out on dedicated servers according to
feedback

* Remove patient animation logic and setting
This commit is contained in:
SilentSpike 2018-08-12 12:28:48 +01:00 committed by GitHub
parent a182336880
commit 0e8ed5315e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 45 deletions

View File

@ -18,9 +18,6 @@ class GVAR(Actions) {
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
@ -191,7 +188,6 @@ class GVAR(Actions) {
callbackSuccess = QFUNC(actionDiagnose);
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationCaller = ""; // TODO
itemConsumed = 0;
litter[] = {};
@ -233,8 +229,6 @@ class GVAR(Actions) {
callbackSuccess = QFUNC(actionPlaceInBodyBag);
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationPatientUnconscious = "";
itemConsumed = 1;
litter[] = {};
};
@ -253,8 +247,6 @@ class GVAR(Actions) {
callbackFailure = QFUNC(treatmentCPR_failure);
callbackProgress = QFUNC(treatmentCPR_progress);
callbackStart = QFUNC(treatmentCPR_start);
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "";
@ -289,8 +281,6 @@ class GVAR(Actions) {
treatmentTime = QUOTE(_target call FUNC(healTime));
callbackSuccess = QFUNC(treatmentFullHeal);
itemConsumed = QEGVAR(medical,consumeItem_PAK);
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "";

View File

@ -135,9 +135,4 @@ class ACE_Settings {
value = 0;
values[] = {"No", "Yes"};
};
class EGVAR(medical,allowUnconsciousAnimationOnTreatment) {
displayName = CSTRING(allowUnconsciousAnimationOnTreatment_DisplayName);
typeName = "BOOL";
value = 0;
};
};

View File

@ -25,6 +25,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened), false]) exi
if !([_caller, _target, _bodyPart, _className] call FUNC(canTreat)) exitWith {false};
private _config = configFile >> QGVAR(Actions) >> _className;
private _isSelf = _caller isEqualTo _target;
// handle items
private _items = getArray (_config >> "items");
@ -58,32 +59,11 @@ if (isNil _callbackProgress) then {
_callbackProgress = missionNamespace getVariable _callbackProgress;
};
// play patient animation
private _patientAnim = getText (_config >> "animationPatient");
if (IS_UNCONSCIOUS(_target) && EGVAR(medical,allowUnconsciousAnimationOnTreatment)) then {
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
_patientAnim = getText (_config >> "animationPatientUnconscious");
};
};
private _isSelf = _caller isEqualTo _target;
if (!_isSelf && {vehicle _target == _target} && {_patientAnim != ""}) then {
if IS_UNCONSCIOUS(_target) then {
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
} else {
[_target, _patientAnim, 1, true] call EFUNC(common,doAnimation);
};
};
// play animation
private "_callerAnim";
if (_isSelf) then {
_callerAnim = getText (_config >> ["animationCallerSelf", "animationCallerSelfProne"] select (stance _caller == "PRONE"));
private _callerAnim = if (_isSelf) then {
getText (_config >> ["animationCallerSelf", "animationCallerSelfProne"] select (stance _caller == "PRONE"));
} else {
_callerAnim = getText (_config >> ["animationCaller", "animationCallerProne"] select (stance _caller == "PRONE"));
getText (_config >> ["animationCaller", "animationCallerProne"] select (stance _caller == "PRONE"));
};
_caller setVariable [QGVAR(selectedWeaponOnTreatment), weaponState _caller];

View File

@ -56,12 +56,6 @@
<Key ID="STR_ACE_Medical_treatment_allowSelfIV_Description">
<English>Allows using IV Transfusions on yourself</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_allowUnconsciousAnimationOnTreatment_DisplayName">
<English>Allow Unconscious Animation</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_allowUnconsciousAnimationOnTreatment_Description">
<English>Allow Unconscious Animation on Treatment.</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_CPRcreatesPulse">
<English>CPR creates pulse</English>
<German>HLW erzeugt einen Puls</German>