From 5d64449210da2c4aedb5c5a2ee86a45431942ae4 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 10 Nov 2016 18:37:14 -0500 Subject: [PATCH 1/5] Add missing private var in antibiotics.sqf --- SQF/dayz_code/medical/antibiotics.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/medical/antibiotics.sqf b/SQF/dayz_code/medical/antibiotics.sqf index f28dea50b..3270f34a4 100644 --- a/SQF/dayz_code/medical/antibiotics.sqf +++ b/SQF/dayz_code/medical/antibiotics.sqf @@ -1,6 +1,6 @@ #include "\z\addons\dayz_code\util\array.hpp"; -private ["_msg","_antibiotics","_hasAntibiotics","_id","_hasMeds","_unit"]; +private ["_msg","_antibiotics","_hasAntibiotics","_id","_hasMeds","_unit","_medsUsed"]; if (count _this > 2) then { _unit = (_this select 3) select 0; From be214d3cc596ed8af6eafd3af6836244b6dae5d7 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 10 Nov 2016 18:46:39 -0500 Subject: [PATCH 2/5] Fix give bloodbag option showing when it shouldn't --- SQF/dayz_code/medical/publicEH/medTransfuse.sqf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf index 0c9a9379a..d6af46afe 100644 --- a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf +++ b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf @@ -78,4 +78,9 @@ while {r_doLoop} do { //Rerun the loop sleep 1; -}; \ No newline at end of file +}; + +if (((r_player_blood / r_player_bloodTotal) >= 0.35) and (player getVariable["USEC_lowBlood",false])) then { + r_player_lowblood = false; + player setVariable["USEC_lowBlood",false,true]; +}; From 343003d9dd57a377531b0f760dcb13c7526cf008 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 10 Nov 2016 19:12:43 -0500 Subject: [PATCH 3/5] Fix load wounded action undefined error --- SQF/dayz_code/compile/fn_damageActions.sqf | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/SQF/dayz_code/compile/fn_damageActions.sqf b/SQF/dayz_code/compile/fn_damageActions.sqf index a4a7d8859..96c56d43d 100644 --- a/SQF/dayz_code/compile/fn_damageActions.sqf +++ b/SQF/dayz_code/compile/fn_damageActions.sqf @@ -8,7 +8,7 @@ if (dayz_actionInProgress) exitWith {}; - [] call fnc_usec_damageActions; ************************************************************/ -private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_assignedRole","_driver","_action","_turret","_weapons","_weaponName","_crew","_unconscious_crew","_patients","_vehType","_unit","_antibiotics","_bloodBags","_unconscious","_lowBlood","_injured","_hasSepsis","_inPain","_legsBroke","_armsBroke","_infected","_hasBandage","_hasSepsisBandage","_hasEpi","_hasMorphine","_hasSplint","_hasPainkillers","_hasEmptyBag","_hasTester","_hasAntibiotics","_hasBloodBag","_vehClose","_hasVehicle","_action1","_action2","_action3","_y","_playerMagazines","_isFriendly"]; +private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_assignedRole","_driver","_action","_turret","_weapons","_weaponName","_crew","_unconscious_crew","_patients","_vehType","_unit","_antibiotics","_bloodBags","_unconscious","_lowBlood","_injured","_hasSepsis","_inPain","_legsBroke","_armsBroke","_infected","_hasBandage","_hasSepsisBandage","_hasEpi","_hasMorphine","_hasSplint","_hasPainkillers","_hasEmptyBag","_hasTester","_hasAntibiotics","_hasBloodBag","_vehClose","_action1","_action2","_action3","_playerMagazines","_isFriendly"]; _menClose = cursorTarget; _hasPatient = alive _menClose; @@ -135,7 +135,6 @@ if (isPlayer cursorTarget) then { _hasBloodBag = Array_Any(_playerMagazines, {_this in _bloodBags}); _vehClose = (getPosATL player) nearEntities [["Car","Tank","Helicopter","Plane","StaticWeapon","Ship"],5]; - _hasVehicle = ({alive _x} count _vehClose > 0); if (_hasPatient) then { //Allow player to drag @@ -150,18 +149,11 @@ if (isPlayer cursorTarget) then { r_player_actions set [count r_player_actions, _action3]; }; //Load Vehicle - if (_hasVehicle && _unconscious) then { - _y = 0; + if (count _vehClose > 0 && _unconscious) then { r_action = true; - _unit = _unit; - _vehicle = _vehClose select _y; - while{((!alive _vehicle) && (_y < (count _vehClose)))} do { - _y = _y + 1; - _vehicle = (_vehClose select _y); - _vehType = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); - uiSleep 0.001; - }; - _action = _unit addAction [format[localize "str_actions_medical_03",_vehType], "\z\addons\dayz_code\medical\load\load_act.sqf",[player,_vehicle,_unit], 0, true, true]; + _vehicle = _vehClose select 0; + _vehType = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + NORRN_loadWoundedAction = _unit addAction [format[localize "str_actions_medical_03",_vehType], "\z\addons\dayz_code\medical\load\load_act.sqf",[player,_vehicle,_unit], 0, true, true]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to bandage From ed49630e0c9986371e0835a122ca0fad6f6ca61a Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 10 Nov 2016 19:13:40 -0500 Subject: [PATCH 4/5] Fix load wounded wrong variable --- SQF/dayz_code/medical/load/load_act.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/medical/load/load_act.sqf b/SQF/dayz_code/medical/load/load_act.sqf index 09ee3bb9f..4fb128492 100644 --- a/SQF/dayz_code/medical/load/load_act.sqf +++ b/SQF/dayz_code/medical/load/load_act.sqf @@ -12,7 +12,7 @@ r_action = false; r_action_load = false; call fnc_usec_medic_removeActions; -_dragger removeAction NORRN_loadWoundedAction; +_wounded removeAction NORRN_loadWoundedAction; if ((_vcl emptyPositions "cargo") > 0) then { From dba59af7c11dde22eb9f38bfccfec710d1bf6309 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 10 Nov 2016 19:14:29 -0500 Subject: [PATCH 5/5] Fix undefined vars in unload_act.sqf --- SQF/dayz_code/medical/load/unLoad_act.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/medical/load/unLoad_act.sqf b/SQF/dayz_code/medical/load/unLoad_act.sqf index 094f3cc0e..ce5f440f0 100644 --- a/SQF/dayz_code/medical/load/unLoad_act.sqf +++ b/SQF/dayz_code/medical/load/unLoad_act.sqf @@ -7,6 +7,8 @@ _args = _this select 3; _name = _args select 0; _vcl = _args select 1; _crewVcl = crew _vcl; +LHA_Deck = []; +LHA_height = 0; //_name removeAction NORRN_pullOutAction; // NORRN_pullOutAction is defined anywhere @@ -34,4 +36,4 @@ for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do uiSleep 0.1; }; -if (true) exitWith {}; \ No newline at end of file +if (true) exitWith {};