Add medic anim function with proper interrupt

Closes #1386

Vanilla commits
applied:
f99a3deced
731b957e8e

Removed
two unused files and a few variables made redundant by actionInProgress
This commit is contained in:
ebayShopper
2017-06-06 15:24:59 -04:00
parent 36b67affee
commit 48858b2e6c
61 changed files with 507 additions and 1341 deletions

View File

@@ -1,17 +1,18 @@
// bleed.sqf
private ["_finished","_isDead","_unit"];
_unit = (_this select 3) select 0;
_isDead = _unit getVariable["USEC_isDead",false];
call fnc_usec_medic_removeActions;
player removeMagazine "ItemEpinephrine";
player playActionNow "Medic";
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
uiSleep 3;
_finished = ["Medic",1] call fn_loopAction;
if (!_isDead) then {
if (!_isDead && _finished && ("ItemEpinephrine" in magazines player)) then {
player removeMagazine "ItemEpinephrine";
_unit setVariable ["NORRN_unconscious", false, true];
_unit setVariable ["USEC_isCardiac",false,true];
uiSleep 5;
//give humanity
[25,0] call player_humanityChange;
@@ -20,4 +21,5 @@ if (!_isDead) then {
publicVariableServer "PVDZ_send";
};
r_action = false;
r_action = false;
dayz_actionInProgress = false;