Finish Medical and Sleep to UiSleep

This commit is contained in:
icomrade
2016-03-05 22:34:09 -05:00
parent eadb3566c4
commit 68da397c52
87 changed files with 1320 additions and 1056 deletions

View File

@@ -5,15 +5,19 @@ _array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if ((_unit == player) || (vehicle player != player)) then {
if ((_unit == player) or (vehicle player != player)) then {
r_player_injured = false;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
r_player_handler = false;
if (r_player_blood == r_player_bloodTotal) then {
player setVariable["USEC_lowBlood",false,true];
};
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1303;
_control = _display displayCtrl 1303;
_control ctrlShow false;
};

View File

@@ -1,61 +0,0 @@
// medBreakLegs.sqf
private ["_array","_unit","_attacker","_cnt","_index","_hit","_damage","_wound","_isInjured","_lowBlood"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_attacker = _array select 1;
if (_unit == player && player distance _attacker < 5) then {
player setVariable["startcombattimer", 1];
// Make bleed
if (random 2 < 1) then {
// Find hit
_cnt = count (DAYZ_woundHit_ok select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit_ok select 1) select _index;
_hit = (DAYZ_woundHit_ok select 0) select _index;
_damage = 0.1 + random (1.2);
//Record Damage to Minor parts (legs, arms)
if (_hit in USEC_MinorWounds) then {
[_unit,_hit,_damage] call object_processHit;
};
player setVariable["medForceUpdate",true,true];
1 call fnc_usec_bulletHit;
_wound = _hit call fnc_usec_damageGetWound;
//Create Wound
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_unit,_wound,_hit];
publicVariable "usecBleed"; //Not sure if this can used over a PVS way, maybe with a rangeCheck like in gutObject.sqf?
//Set Injured if not already
_isInjured = _unit getVariable["USEC_injured",false];
if (!_isInjured) then {
_unit setVariable["USEC_injured",true,true];
dayz_sourceBleeding = _attacker;
};
//Set ability to give blood
_lowBlood = _unit getVariable["USEC_lowBlood",false];
if (!_lowBlood) then {
_unit setVariable["USEC_lowBlood",true,true];
};
r_player_injured = true;
// reduce blood
r_player_blood = r_player_blood - 50;
// Make player infected
if (random 5 < 1) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];
};
};
[_unit,"hit",2,false] call dayz_zombieSpeak;
};

View File

@@ -1,23 +1,15 @@
// animHealed.sqf
private ["_array","_unit","_medic","_isDead"];
// called by PublicVariableEventHandler "PVCDZ_hlt_Epi", received from the server,
// because another player sent a PVDZ_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]];
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
_unit = _array select 0; // healed
_medic = _array select 1; // healer
_isDead = _unit getVariable["USEC_isDead",false];
if (local _unit) then {_unit setCaptive false};
//if (local _unit) then {_unit setCaptive false}; // captive ????
if (!_isDead) then {
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
//no need to public broadcast the variables since this runs on every peer
_unit setVariable ["NORRN_unconscious", false, false];
_unit setVariable ["USEC_isCardiac",false, false];
if (_unit == player) then {
r_player_unconscious = false;
disableUserInput false;
r_player_cardiac = false;
r_player_handler1 = false;
};
if (_unit == player and !(_unit getVariable["USEC_isDead",false]) and _medic != _unit and _medic distance _unit < 5) then {
_unit setVariable ["NORRN_unconscious", false, false]; r_player_unconscious = false;
_unit setVariable ["USEC_isCardiac",false, false]; r_player_cardiac = false;
//AmovPpneMstpSnonWnonDnon_healed
};

View File

@@ -1,20 +1,22 @@
// animHealed.sqf
private ["_array","_unit","_medic","_display","_control","_id"];
private ["_array","_unit","_medic","_display","_control"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if ((_unit == player) || (vehicle player != player)) then {
if ((_unit == player) or (vehicle player != player)) then {
r_fracture_legs = false;
r_fracture_arms = false;
_unit setHit["legs",0];
_unit setHit["hands",0];
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1203;
_control = _display displayCtrl 1203;
_control ctrlShow false;
// _id = false spawn dayz_disableRespawn;
};
//_id = false spawn dayz_disableRespawn;
};
_unit setVariable ["hit_legs",0,true];
_unit setVariable ["hit_hands",0,true];

View File

@@ -1,12 +1,8 @@
// animHealed.sqf
private ["_array","_unit","_medic"];
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if ((_unit == player) || (vehicle player != player)) then {
if ((_unit == player) or (vehicle player != player)) then {
r_player_inpain = false;
R3F_TIRED_Accumulator = 0;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
};