From a880e198adff358d900a1652a7320b259e8877d7 Mon Sep 17 00:00:00 2001 From: AirwavesMan Date: Sat, 12 Sep 2020 21:21:55 +0200 Subject: [PATCH] Update private tags, remove one old file --- SQF/dayz_code/compile/object_getHit.sqf | 4 ++-- SQF/dayz_code/compile/object_processHit.sqf | 9 +++++---- SQF/dayz_code/compile/object_setHit.sqf | 3 ++- SQF/dayz_code/compile/object_setHitLocal.sqf | 16 ---------------- SQF/dayz_code/init/compiles.sqf | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) delete mode 100644 SQF/dayz_code/compile/object_setHitLocal.sqf diff --git a/SQF/dayz_code/compile/object_getHit.sqf b/SQF/dayz_code/compile/object_getHit.sqf index bdf5c0895..d940b0d45 100644 --- a/SQF/dayz_code/compile/object_getHit.sqf +++ b/SQF/dayz_code/compile/object_getHit.sqf @@ -1,7 +1,7 @@ -private["_unit","_hp","_selection","_strH","_dam"]; +private ["_unit","_hp","_selection","_dam"]; + _unit = _this select 0; _hp = _this select 1; - _selection = getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints" >> _hp >> "name"); _dam = _unit getHit _selection; diff --git a/SQF/dayz_code/compile/object_processHit.sqf b/SQF/dayz_code/compile/object_processHit.sqf index f3e4f2e2f..f3599507a 100644 --- a/SQF/dayz_code/compile/object_processHit.sqf +++ b/SQF/dayz_code/compile/object_processHit.sqf @@ -1,4 +1,5 @@ -private["_break","_ctrlFracture"]; +private ["_unit","_break","_ctrlFracture","_selection","_damage","_strH","_dam","_total","_display"]; + _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; @@ -17,14 +18,14 @@ if (local _unit) then { _ctrlFracture = _display displayCtrl 1203; if ((_selection == "legs") and !r_fracture_legs) then { - _id = [] spawn { //do not touch this spawn! + [] spawn { //do not touch this spawn! player setHit["legs",1]; }; r_fracture_legs = true; _break = true; }; if ((_selection == "arms") and !r_fracture_arms) then { - _id = [] spawn { // do not touch this spawn! + [] spawn { // do not touch this spawn! player setHit["hands",1]; }; r_fracture_arms = true; @@ -35,4 +36,4 @@ if (local _unit) then { [player,"fracture",0,false] call dayz_zombieSpeak; _ctrlFracture ctrlShow true; }; -}; \ No newline at end of file +}; diff --git a/SQF/dayz_code/compile/object_setHit.sqf b/SQF/dayz_code/compile/object_setHit.sqf index 28b50922e..ac32489b0 100644 --- a/SQF/dayz_code/compile/object_setHit.sqf +++ b/SQF/dayz_code/compile/object_setHit.sqf @@ -1,6 +1,7 @@ // this function name is "object_setHit", but it's used to set character limb damages back during a skin change (player_humanityMorph.sqf) -private ["_damage"]; +private ["_unit","_damage","_selection","_strH","_dam"]; + _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; diff --git a/SQF/dayz_code/compile/object_setHitLocal.sqf b/SQF/dayz_code/compile/object_setHitLocal.sqf deleted file mode 100644 index e80535b00..000000000 --- a/SQF/dayz_code/compile/object_setHitLocal.sqf +++ /dev/null @@ -1,16 +0,0 @@ -// private["_unit","_selection","_strH","_dam","_total"]; -// _unit = _this select 0; -// _selection = _this select 1; -// _damage = _this select 2; -// if ((_selection != "")) then { -// _strH = "hit_" + (_selection); -// _dam = _unit getVariable [_strH,0]; -// _total = (_dam + _damage); -// if (_total > 1) then { -// _total = 1; -// }; -// _unit setVariable [_strH,_total]; -// } else { -// _damage = 0; -// }; -// _damage \ No newline at end of file diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 8ae4f59d9..c7b2b2022 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -734,7 +734,7 @@ fn_selectRandomLocation = compile preprocessFileLineNumbers "\z\addons\dayz_code fn_addCargo = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_addCargo.sqf"; fn_chance = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selectRandomChance.sqf"; fn_getModelName = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_getModelName.sqf"; -fnc_Obj_FenceHandleDam = {}; +fnc_Obj_FenceHandleDam = {}; //Needed for vanilla fences to prevent rpt errors object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf"; fn_shuffleArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_shuffleArray.sqf"; zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_initialize.sqf";