From 207f4e3b8873d889c3917529d3609a9d00b2b06b Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Tue, 22 Oct 2013 10:16:20 -0500 Subject: [PATCH] private arrays part 2 --- SQF/dayz_code/Configs/CfgLootSmall.hpp | 8 ++++---- .../Configs/CfgVehicles/LAND/Gaz_Vodnik.hpp | 2 +- SQF/dayz_code/Configs/cfgLoot.hpp | 16 ++++++++-------- SQF/dayz_code/compile/BIS_fnc/fn_vectorAdd.sqf | 2 +- SQF/dayz_code/compile/vehicle_handleDamage.sqf | 2 +- SQF/dayz_code/compile/wild_spawnZombies.sqf | 2 +- SQF/dayz_code/compile/zombie_findTarget.sqf | 2 +- SQF/dayz_code/compile/zombie_findTargetAgent.sqf | 2 +- SQF/dayz_code/compile/zombie_generate.sqf | 2 +- SQF/dayz_code/compile/zombie_initialize.sqf | 2 +- SQF/dayz_code/compile/zombie_loiter.sqf | 2 +- SQF/dayz_code/init/compiles.sqf | 3 --- SQF/dayz_code/init/loot_init.sqf | 2 +- SQF/dayz_code/init/vehicle_init.sqf | 2 +- SQF/dayz_code/init/zombie_init.sqf | 2 +- SQF/dayz_code/medical/antibiotics.sqf | 2 +- SQF/dayz_code/medical/bandage.sqf | 3 +++ SQF/dayz_code/medical/carry.sqf | 2 +- SQF/dayz_code/medical/carry_old.sqf | 2 +- SQF/dayz_code/medical/drag.sqf | 2 +- SQF/dayz_code/medical/drop_body.sqf | 1 + SQF/dayz_code/medical/epinephrine.sqf | 2 ++ SQF/dayz_code/medical/init_medical.sqf | 4 +++- SQF/dayz_code/medical/load/load_wounded.sqf | 2 +- SQF/dayz_code/medical/load/unLoad_act.sqf | 2 +- SQF/dayz_code/medical/load_wounded.sqf | 2 +- SQF/dayz_code/medical/morphine.sqf | 2 ++ SQF/dayz_code/medical/painkiller.sqf | 2 +- SQF/dayz_code/medical/publicEH/allowDamage.sqf | 1 + SQF/dayz_code/medical/publicEH/animDrag.sqf | 1 + SQF/dayz_code/medical/publicEH/animHealed.sqf | 1 + SQF/dayz_code/medical/publicEH/carriedUp.sqf | 1 + SQF/dayz_code/medical/publicEH/deadState.sqf | 4 ++-- SQF/dayz_code/medical/publicEH/lieStill.sqf | 4 ++-- SQF/dayz_code/medical/publicEH/load_wounded.sqf | 1 + SQF/dayz_code/medical/publicEH/medBreakLegs.sqf | 2 +- SQF/dayz_code/medical/publicEH/medEpi.sqf | 2 ++ SQF/dayz_code/medical/publicEH/medMorphine.sqf | 2 +- SQF/dayz_code/medical/publicEH/medPainkiller.sqf | 2 ++ SQF/dayz_code/medical/publicEH/medTransfuse.sqf | 2 +- SQF/dayz_code/medical/publicEH/medinject.sqf | 2 ++ SQF/dayz_code/medical/publicEH/noAnim.sqf | 1 + SQF/dayz_code/medical/publicEH/noDamage.sqf | 3 ++- SQF/dayz_code/medical/publicEH/pickUp.sqf | 1 + SQF/dayz_code/medical/publicEH/promptRName.sqf | 1 + SQF/dayz_code/medical/publicEH/rolltoback.sqf | 4 ++-- SQF/dayz_code/medical/publicEH/rolltofront.sqf | 4 ++-- SQF/dayz_code/medical/publicEH/set180.sqf | 1 + SQF/dayz_code/medical/pulse.sqf | 2 ++ SQF/dayz_code/medical/setup_functions_med.sqf | 16 +++++++++------- SQF/dayz_code/medical/transfusion.sqf | 2 +- .../system/BIS_Effects/airdestruction.sqf | 1 + .../system/BIS_Effects/airdestructionstage2.sqf | 2 ++ SQF/dayz_code/system/BIS_Effects/killed.sqf | 2 +- SQF/dayz_code/system/antihack.sqf | 2 +- SQF/dayz_code/system/building_monitor.sqf | 3 +-- SQF/dayz_code/system/player_spawn_1.sqf | 2 +- SQF/dayz_code/system/player_spawn_2.sqf | 2 +- 58 files changed, 91 insertions(+), 62 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgLootSmall.hpp b/SQF/dayz_code/Configs/CfgLootSmall.hpp index 203441440..41dff0791 100644 --- a/SQF/dayz_code/Configs/CfgLootSmall.hpp +++ b/SQF/dayz_code/Configs/CfgLootSmall.hpp @@ -368,7 +368,7 @@ class CfgLootSmall { 0.04, 0.01, 0.04, - 0.01, + 0.01 } }; policeman[] = { @@ -450,7 +450,7 @@ class CfgLootSmall { "Skin_Rocker4_DZ", "Skin_SurvivorW3_DZ", "Skin_SurvivorWpink_DZ", - "Skin_SurvivorWurban_DZ", + "Skin_SurvivorWurban_DZ" //"Skin_SurvivorWsequisha_DZ", //"Skin_SurvivorWsequishaD_DZ", }, @@ -465,7 +465,7 @@ class CfgLootSmall { 0.08, 0.09, 0.09, - 0.07, + 0.07 //0.04, //0.02 } @@ -518,7 +518,7 @@ class CfgLootSmall { "Skin_GUE_Soldier_Sniper_DZ", "Skin_GUE_Soldier_Crew_DZ", "Skin_GUE_Soldier_CO_DZ", - "Skin_GUE_Soldier_2_DZ", + "Skin_GUE_Soldier_2_DZ" }, { 0.1, diff --git a/SQF/dayz_code/Configs/CfgVehicles/LAND/Gaz_Vodnik.hpp b/SQF/dayz_code/Configs/CfgVehicles/LAND/Gaz_Vodnik.hpp index fb0644ee6..597f20db7 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/LAND/Gaz_Vodnik.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/LAND/Gaz_Vodnik.hpp @@ -748,7 +748,7 @@ class Turrets : Turrets "PKT" }; magazines[] = { - "100Rnd_762x54_PK", + "100Rnd_762x54_PK" }; soundServo[] = { }; diff --git a/SQF/dayz_code/Configs/cfgLoot.hpp b/SQF/dayz_code/Configs/cfgLoot.hpp index a1b979f01..a006edbcd 100644 --- a/SQF/dayz_code/Configs/cfgLoot.hpp +++ b/SQF/dayz_code/Configs/cfgLoot.hpp @@ -495,7 +495,7 @@ class CfgLoot { "Skin_Rocker4_DZ", "Skin_SurvivorW3_DZ", "Skin_SurvivorWpink_DZ", - "Skin_SurvivorWurban_DZ", + "Skin_SurvivorWurban_DZ" //"Skin_SurvivorWsequisha_DZ", //"Skin_SurvivorWsequishaD_DZ", }, @@ -510,7 +510,7 @@ class CfgLoot { 0.08, 0.09, 0.09, - 0.07, + 0.07 //0.04, //0.02 } @@ -563,7 +563,7 @@ class CfgLoot { "Skin_GUE_Soldier_Sniper_DZ", "Skin_GUE_Soldier_Crew_DZ", "Skin_GUE_Soldier_CO_DZ", - "Skin_GUE_Soldier_2_DZ", + "Skin_GUE_Soldier_2_DZ" }, { 0.1, @@ -587,12 +587,12 @@ class CfgLoot { { "ItemTentOld", "ItemTentDomed", - "ItemTentDomed2", + "ItemTentDomed2" }, { 0.34, 0.33, - 0.33, + 0.33 } }; backpacks[] = { @@ -602,7 +602,7 @@ class CfgLoot { "DZ_TerminalPack_EP1", // 1-15 "DZ_ALICE_Pack_EP1", // 2-20 "DZ_TK_Assault_Pack_EP1", // 2-22 - "DZ_CompactPack_EP1", // 2-25 + "DZ_CompactPack_EP1" // 2-25 }, { 0.22, @@ -610,7 +610,7 @@ class CfgLoot { 0.18, 0.16, 0.13, - 0.11, + 0.11 } }; militarybackpacks[] = { @@ -626,7 +626,7 @@ class CfgLoot { 0.25, 0.20, 0.15, - 0.10, + 0.10 } }; }; \ No newline at end of file diff --git a/SQF/dayz_code/compile/BIS_fnc/fn_vectorAdd.sqf b/SQF/dayz_code/compile/BIS_fnc/fn_vectorAdd.sqf index 51360b0cc..017b60a63 100644 --- a/SQF/dayz_code/compile/BIS_fnc/fn_vectorAdd.sqf +++ b/SQF/dayz_code/compile/BIS_fnc/fn_vectorAdd.sqf @@ -14,7 +14,7 @@ Returns a vector that is the sum of and . ************************************************************/ -private["_p1","_p2","_return"]; +private ["_p1","_p2","_return","_c"]; _p1 = _this select 0; _p2 = _this select 1; diff --git a/SQF/dayz_code/compile/vehicle_handleDamage.sqf b/SQF/dayz_code/compile/vehicle_handleDamage.sqf index 2ebb420b9..ab753a26f 100644 --- a/SQF/dayz_code/compile/vehicle_handleDamage.sqf +++ b/SQF/dayz_code/compile/vehicle_handleDamage.sqf @@ -3,7 +3,7 @@ ASSIGN DAMAGE TO A UNIT - Function Vehicle_HandleDamage - [unit, selectionName, damage, source, projectile] call Vehicle_HandleDamage; ************************************************************/ -private["_unit","_selection","_strH","_dam","_total","_damage","_needUpdate"]; +private ["_unit","_selection","_strH","_dam","_total","_needUpdate"]; _unit = _this select 0; _selection = _this select 1; _total = _this select 2; diff --git a/SQF/dayz_code/compile/wild_spawnZombies.sqf b/SQF/dayz_code/compile/wild_spawnZombies.sqf index b46cba839..c6018df06 100644 --- a/SQF/dayz_code/compile/wild_spawnZombies.sqf +++ b/SQF/dayz_code/compile/wild_spawnZombies.sqf @@ -1,4 +1,4 @@ -private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"]; +private ["_position","_doLoiter","_unitTypes","_loot","_array","_agent","_type","_radius","_method","_myDest","_newDest","_lootType","_player","_isAlive","_rnd","_id"]; _player = _this select 0; _unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass"); _doLoiter = true; diff --git a/SQF/dayz_code/compile/zombie_findTarget.sqf b/SQF/dayz_code/compile/zombie_findTarget.sqf index 7814066c9..21a583cea 100644 --- a/SQF/dayz_code/compile/zombie_findTarget.sqf +++ b/SQF/dayz_code/compile/zombie_findTarget.sqf @@ -1,4 +1,4 @@ -private["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_leadheight","_nearEnts","_rnd","_assigned"]; +private ["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_rnd","_assigned","_fires","_range"]; _group = _this; _target = objNull; _lead = leader _group; diff --git a/SQF/dayz_code/compile/zombie_findTargetAgent.sqf b/SQF/dayz_code/compile/zombie_findTargetAgent.sqf index f3640e04f..2ec36bf4f 100644 --- a/SQF/dayz_code/compile/zombie_findTargetAgent.sqf +++ b/SQF/dayz_code/compile/zombie_findTargetAgent.sqf @@ -1,4 +1,4 @@ -private["_agent","_target","_targets","_targetDis","_c","_man","_manDis","_targets","_agent","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"]; +private ["_agent","_target","_targets","_targetDis","_man","_manDis","_range","_objects","_refobj"]; _agent = _this; _target = objNull; /* diff --git a/SQF/dayz_code/compile/zombie_generate.sqf b/SQF/dayz_code/compile/zombie_generate.sqf index bb6c024cf..bb7367807 100644 --- a/SQF/dayz_code/compile/zombie_generate.sqf +++ b/SQF/dayz_code/compile/zombie_generate.sqf @@ -1,4 +1,4 @@ -private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"]; +private ["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_myDest","_newDest","_lootType","_isAlive","_rnd","_id"]; _position = _this select 0; _doLoiter = _this select 1; _unitTypes = _this select 2; diff --git a/SQF/dayz_code/compile/zombie_initialize.sqf b/SQF/dayz_code/compile/zombie_initialize.sqf index 586696174..520062f4a 100644 --- a/SQF/dayz_code/compile/zombie_initialize.sqf +++ b/SQF/dayz_code/compile/zombie_initialize.sqf @@ -1,4 +1,4 @@ -private["_unit"]; +private ["_unit","_position"]; _unit = _this select 0; if (isServer) then { _unit addEventHandler ["local", {_this call zombie_findOwner}]; diff --git a/SQF/dayz_code/compile/zombie_loiter.sqf b/SQF/dayz_code/compile/zombie_loiter.sqf index ffaf607c8..47db6cf10 100644 --- a/SQF/dayz_code/compile/zombie_loiter.sqf +++ b/SQF/dayz_code/compile/zombie_loiter.sqf @@ -1,4 +1,4 @@ -private["_unit","_originalPos","_pos"]; +private ["_unit","_originalPos","_pos","_chance","_playerpos"]; _unit = _this select 0; _originalPos = _this select 1; _pos = getPosATL _unit; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 10b79565f..5db973e87 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -3,9 +3,6 @@ */ //Player only if (!isDedicated) then { - _config = configFile >> "CfgLoot"; - _config1 = configFile >> "CfgMagazines" >> "FoodEdible"; - _config2 = configFile >> "CfgWeapons" >> "Loot"; "filmic" setToneMappingParams [0.07, 0.31, 0.23, 0.37, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; diff --git a/SQF/dayz_code/init/loot_init.sqf b/SQF/dayz_code/init/loot_init.sqf index a2ed91016..c1c3dc9b8 100644 --- a/SQF/dayz_code/init/loot_init.sqf +++ b/SQF/dayz_code/init/loot_init.sqf @@ -1,4 +1,4 @@ -private["_cfgCount","_config","_i","_itemChances","_itemCount","_weighted","_j","_weight","_l","_k","_type","_canZombie","_canLoot"]; +private ["_config","_itemChances","_itemCount","_weighted","_j","_weight","_type","_canZombie","_canLoot","_classname","_itemChancesSmall","_itemCountSmall"]; dayz_CBLChances = []; dayz_CBLBase = []; diff --git a/SQF/dayz_code/init/vehicle_init.sqf b/SQF/dayz_code/init/vehicle_init.sqf index a421e9877..e6c237183 100644 --- a/SQF/dayz_code/init/vehicle_init.sqf +++ b/SQF/dayz_code/init/vehicle_init.sqf @@ -3,7 +3,7 @@ ASSIGN DAMAGE HANDLER TO A UNIT - Function set_EH - unit call set_EH; ************************************************************/ -private["_unit","_eh1","_eh2","_dir","_location"]; +private ["_unit","_eh1","_eh2","_dir","_location","_eh3","_eh4","_eh5","_eh6"]; _unit = _this; _dir = getdir _this; _location = getPosATL _this; diff --git a/SQF/dayz_code/init/zombie_init.sqf b/SQF/dayz_code/init/zombie_init.sqf index 6a89b2622..0d03429fd 100644 --- a/SQF/dayz_code/init/zombie_init.sqf +++ b/SQF/dayz_code/init/zombie_init.sqf @@ -1,4 +1,4 @@ -private["_unit"]; +private ["_unit","_id"]; _unit = _this select 0; _id = _unit addeventhandler ["HandleDamage",{_this call local_zombieDamage}]; _id = _unit addeventhandler ["Killed",{[_this,"zombieKills"] call local_eventKill}]; diff --git a/SQF/dayz_code/medical/antibiotics.sqf b/SQF/dayz_code/medical/antibiotics.sqf index ab6307ac8..5f1b56d03 100644 --- a/SQF/dayz_code/medical/antibiotics.sqf +++ b/SQF/dayz_code/medical/antibiotics.sqf @@ -1,4 +1,4 @@ -private["_hasMeds","_med","_effect"]; +private ["_hasMeds","_med"]; _med = "ItemAntibiotic"; _hasMeds = _med in magazines player; if (_hasMeds) then { diff --git a/SQF/dayz_code/medical/bandage.sqf b/SQF/dayz_code/medical/bandage.sqf index 88c95adc4..116b1d278 100644 --- a/SQF/dayz_code/medical/bandage.sqf +++ b/SQF/dayz_code/medical/bandage.sqf @@ -1,4 +1,7 @@ // bleed.sqf + +private ["_started","_finished","_animState","_isMedic","_id","_unit"]; + _unit = (_this select 3) select 0; player removeMagazine "ItemBandage"; diff --git a/SQF/dayz_code/medical/carry.sqf b/SQF/dayz_code/medical/carry.sqf index f6128a1f6..4c591ed49 100644 --- a/SQF/dayz_code/medical/carry.sqf +++ b/SQF/dayz_code/medical/carry.sqf @@ -9,7 +9,7 @@ Start carry.sqf */ -private ["_unit","_dragee","_pos","_dir"]; +private ["_unit","_dragee","_anim_name","_can_be_revived","_can_be_revived_2"]; _dragee = _this select 3; _can_be_revived = NORRN_revive_array select 20; _can_be_revived_2 = NORRN_revive_array select 21; diff --git a/SQF/dayz_code/medical/carry_old.sqf b/SQF/dayz_code/medical/carry_old.sqf index 7e1e402ef..a56b42301 100644 --- a/SQF/dayz_code/medical/carry_old.sqf +++ b/SQF/dayz_code/medical/carry_old.sqf @@ -9,7 +9,7 @@ Start carry.sqf */ -private ["_unit","_dragee","_pos","_dir"]; +private ["_unit","_dragee","_anim_name","_can_be_revived","_can_be_revived_2"]; _dragee = _this select 3; _can_be_revived = NORRN_revive_array select 20; _can_be_revived_2 = NORRN_revive_array select 21; diff --git a/SQF/dayz_code/medical/drag.sqf b/SQF/dayz_code/medical/drag.sqf index be493898c..3333e72c4 100644 --- a/SQF/dayz_code/medical/drag.sqf +++ b/SQF/dayz_code/medical/drag.sqf @@ -9,7 +9,7 @@ Start drag.sqf */ -private ["_unit","_dragee","_pos","_dir"]; +private ["_unit","_dragee","_unconscious"]; _dragee = _this select 3; _unit = player; _unconscious = _dragee getVariable ["NORRN_unconscious", false]; diff --git a/SQF/dayz_code/medical/drop_body.sqf b/SQF/dayz_code/medical/drop_body.sqf index b25c71050..714b25b9d 100644 --- a/SQF/dayz_code/medical/drop_body.sqf +++ b/SQF/dayz_code/medical/drop_body.sqf @@ -8,6 +8,7 @@ Start drop_body.sqf */ +private ["_dragee","_unit"]; _dragee = _this select 3; player removeAction NORRN_dropAction; diff --git a/SQF/dayz_code/medical/epinephrine.sqf b/SQF/dayz_code/medical/epinephrine.sqf index 7fa8868dd..455eac030 100644 --- a/SQF/dayz_code/medical/epinephrine.sqf +++ b/SQF/dayz_code/medical/epinephrine.sqf @@ -1,4 +1,6 @@ // bleed.sqf + +private ["_unit","_isDead"]; _unit = (_this select 3) select 0; _isDead = _unit getVariable["USEC_isDead",false]; call fnc_usec_medic_removeActions; diff --git a/SQF/dayz_code/medical/init_medical.sqf b/SQF/dayz_code/medical/init_medical.sqf index 218ac4186..7a70e9d41 100644 --- a/SQF/dayz_code/medical/init_medical.sqf +++ b/SQF/dayz_code/medical/init_medical.sqf @@ -1,5 +1,5 @@ // init_related_scripts.sqf ArmA2 revive -// © AUGUST 2010 - norrin +// � AUGUST 2010 - norrin // Functions @@ -9,6 +9,8 @@ #include "\ca\editor\Data\Scripts\dikCodes.h" //Settings + +private ["_id","_rnd","_lowBlood"]; usec_bandage_recovery = 5; //time to recover after bandaging //"colorCorrections" ppEffectEnable true; diff --git a/SQF/dayz_code/medical/load/load_wounded.sqf b/SQF/dayz_code/medical/load/load_wounded.sqf index f2ed71a39..fe20633b5 100644 --- a/SQF/dayz_code/medical/load/load_wounded.sqf +++ b/SQF/dayz_code/medical/load/load_wounded.sqf @@ -1,7 +1,7 @@ // Load_wounded.sqf // OCTOBER 2010 - norrin -private ["_wounded","_vcl","_group"]; +private ["_wounded","_vcl"]; _wounded = _this select 0; diff --git a/SQF/dayz_code/medical/load/unLoad_act.sqf b/SQF/dayz_code/medical/load/unLoad_act.sqf index 70b189f34..da5549b0f 100644 --- a/SQF/dayz_code/medical/load/unLoad_act.sqf +++ b/SQF/dayz_code/medical/load/unLoad_act.sqf @@ -1,7 +1,7 @@ // unLoad_act.sqf // AUGUST 2010 - norrin -private ["_args","_dragger","_vcl","_wounded"]; +private ["_args","_vcl","_loop","_position","_isOnDeck","_unit","_name","_crewVcl"]; _args = _this select 3; _name = _args select 0; diff --git a/SQF/dayz_code/medical/load_wounded.sqf b/SQF/dayz_code/medical/load_wounded.sqf index ec32fd63a..f39156a92 100644 --- a/SQF/dayz_code/medical/load_wounded.sqf +++ b/SQF/dayz_code/medical/load_wounded.sqf @@ -1,7 +1,7 @@ // Load_wounded.sqf // OCTOBER 2010 - norrin -private ["_wounded","_vcl","_group"]; +private ["_wounded","_vcl"]; _wounded = _this select 0; diff --git a/SQF/dayz_code/medical/morphine.sqf b/SQF/dayz_code/medical/morphine.sqf index ae62c88f4..42e266735 100644 --- a/SQF/dayz_code/medical/morphine.sqf +++ b/SQF/dayz_code/medical/morphine.sqf @@ -1,4 +1,6 @@ // bleed.sqf + +private ["_started","_finished","_animState","_isMedic","_id","_num_removed","_unit"]; _unit = (_this select 3) select 0; _unit setVariable ["hit_legs",0]; diff --git a/SQF/dayz_code/medical/painkiller.sqf b/SQF/dayz_code/medical/painkiller.sqf index 193bfdd13..aa9cb33be 100644 --- a/SQF/dayz_code/medical/painkiller.sqf +++ b/SQF/dayz_code/medical/painkiller.sqf @@ -1,6 +1,6 @@ // bleed.sqf -private ["_id","_unit"]; +private ["_id","_unit","_num_removed"]; _unit = (_this select 3) select 0; diff --git a/SQF/dayz_code/medical/publicEH/allowDamage.sqf b/SQF/dayz_code/medical/publicEH/allowDamage.sqf index 32d3b3bda..979f877cf 100644 --- a/SQF/dayz_code/medical/publicEH/allowDamage.sqf +++ b/SQF/dayz_code/medical/publicEH/allowDamage.sqf @@ -1,5 +1,6 @@ // allowDamage.sqf +private ["_unit"]; _unit = _this select 0; _unit switchMove "AmovPpneMstpSnonWnonDnon_healed"; diff --git a/SQF/dayz_code/medical/publicEH/animDrag.sqf b/SQF/dayz_code/medical/publicEH/animDrag.sqf index 0a5fc2899..f559bde93 100644 --- a/SQF/dayz_code/medical/publicEH/animDrag.sqf +++ b/SQF/dayz_code/medical/publicEH/animDrag.sqf @@ -1,5 +1,6 @@ // animDrag.sqf +private ["_dragee"]; _dragee = _this select 0; _dragee switchmove "ainjppnemstpsnonwrfldb_still"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/animHealed.sqf b/SQF/dayz_code/medical/publicEH/animHealed.sqf index 4fc05e9cf..bfa7b530d 100644 --- a/SQF/dayz_code/medical/publicEH/animHealed.sqf +++ b/SQF/dayz_code/medical/publicEH/animHealed.sqf @@ -1,5 +1,6 @@ // animHealed.sqf +private ["_unit"]; _unit = _this select 0; _unit switchMove "AmovPpneMstpSnonWnonDnon_healed"; diff --git a/SQF/dayz_code/medical/publicEH/carriedUp.sqf b/SQF/dayz_code/medical/publicEH/carriedUp.sqf index db14c2220..359eb98cf 100644 --- a/SQF/dayz_code/medical/publicEH/carriedUp.sqf +++ b/SQF/dayz_code/medical/publicEH/carriedUp.sqf @@ -1,4 +1,5 @@ //carriedUp.sqf +private ["_dragee"]; _dragee = _this select 0; _dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_up"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/deadState.sqf b/SQF/dayz_code/medical/publicEH/deadState.sqf index 9ca669bd1..a14c996fe 100644 --- a/SQF/dayz_code/medical/publicEH/deadState.sqf +++ b/SQF/dayz_code/medical/publicEH/deadState.sqf @@ -1,6 +1,6 @@ //deadState.sqf +private ["_unit"]; _unit = _this select 0; -_unit switchMove "deadState"; - +_unit switchMove "deadState"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/lieStill.sqf b/SQF/dayz_code/medical/publicEH/lieStill.sqf index c8e391aee..5080a55ad 100644 --- a/SQF/dayz_code/medical/publicEH/lieStill.sqf +++ b/SQF/dayz_code/medical/publicEH/lieStill.sqf @@ -1,6 +1,6 @@ //lieStill.sqf +private ["_dragee"]; _dragee = _this select 0; -_dragee playMoveNow "ainjppnemstpsnonwrfldnon"; - +_dragee playMoveNow "ainjppnemstpsnonwrfldnon"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/load_wounded.sqf b/SQF/dayz_code/medical/publicEH/load_wounded.sqf index 627590db3..3538292ff 100644 --- a/SQF/dayz_code/medical/publicEH/load_wounded.sqf +++ b/SQF/dayz_code/medical/publicEH/load_wounded.sqf @@ -1,5 +1,6 @@ // load_wounded.sqf +private ["_unit"]; _unit = _this select 0; _unit switchMove "kia_hmmwv_driver"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/medBreakLegs.sqf b/SQF/dayz_code/medical/publicEH/medBreakLegs.sqf index 010608aea..a57bc740b 100644 --- a/SQF/dayz_code/medical/publicEH/medBreakLegs.sqf +++ b/SQF/dayz_code/medical/publicEH/medBreakLegs.sqf @@ -1,5 +1,5 @@ // medBreakLegs.sqf -private["_array","_unit","_attacker","_display","_control","_hitLegs","_hitArms"]; +private ["_array","_unit","_attacker","_cnt","_index","_hit","_damage","_wound","_isInjured","_lowBlood"]; disableserialization; _array = _this; //_this select 0; _unit = _array select 0; diff --git a/SQF/dayz_code/medical/publicEH/medEpi.sqf b/SQF/dayz_code/medical/publicEH/medEpi.sqf index c65ba85e5..9abe142fd 100644 --- a/SQF/dayz_code/medical/publicEH/medEpi.sqf +++ b/SQF/dayz_code/medical/publicEH/medEpi.sqf @@ -1,4 +1,6 @@ // animHealed.sqf + +private ["_array","_unit","_medic","_isDead"]; _array = _this; //_this select 0; _unit = _array select 0; _medic = _array select 1; diff --git a/SQF/dayz_code/medical/publicEH/medMorphine.sqf b/SQF/dayz_code/medical/publicEH/medMorphine.sqf index 241a8166d..3cffdc96f 100644 --- a/SQF/dayz_code/medical/publicEH/medMorphine.sqf +++ b/SQF/dayz_code/medical/publicEH/medMorphine.sqf @@ -1,5 +1,5 @@ // animHealed.sqf -private["_array","_unit","_medic","_display","_control","_hitLegs","_hitArms"]; +private ["_array","_unit","_medic","_display","_control","_id"]; disableserialization; _array = _this; //_this select 0; _unit = _array select 0; diff --git a/SQF/dayz_code/medical/publicEH/medPainkiller.sqf b/SQF/dayz_code/medical/publicEH/medPainkiller.sqf index 771fbc336..97b40bbf0 100644 --- a/SQF/dayz_code/medical/publicEH/medPainkiller.sqf +++ b/SQF/dayz_code/medical/publicEH/medPainkiller.sqf @@ -1,4 +1,6 @@ // animHealed.sqf + +private ["_array","_unit","_medic"]; _array = _this; //_this select 0; _unit = _array select 0; _medic = _array select 1; diff --git a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf index 59741f5a1..13ed27295 100644 --- a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf +++ b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf @@ -1,5 +1,5 @@ // animHealed.sqf -private["_array","_unit","_medic","_display","_control","_lowBlood"]; +private ["_array","_unit","_medic","_display","_control","_rndInfection","_TransfusionInfection"]; disableserialization; _array = _this; //_this select 0; _unit = _array select 0; diff --git a/SQF/dayz_code/medical/publicEH/medinject.sqf b/SQF/dayz_code/medical/publicEH/medinject.sqf index 0bdf41c7c..14c3ec7f6 100644 --- a/SQF/dayz_code/medical/publicEH/medinject.sqf +++ b/SQF/dayz_code/medical/publicEH/medinject.sqf @@ -1,4 +1,6 @@ // animHealed.sqf + +private ["_array","_unit","_medic","_item"]; _array = _this; //_this select 0; _unit = _array select 0; _medic = _array select 1; diff --git a/SQF/dayz_code/medical/publicEH/noAnim.sqf b/SQF/dayz_code/medical/publicEH/noAnim.sqf index 4bab319d2..9a26a3bf1 100644 --- a/SQF/dayz_code/medical/publicEH/noAnim.sqf +++ b/SQF/dayz_code/medical/publicEH/noAnim.sqf @@ -1,5 +1,6 @@ //noAnim.sqf +private ["_unit"]; _unit = _this select 0; _unit switchMove ""; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/noDamage.sqf b/SQF/dayz_code/medical/publicEH/noDamage.sqf index 4001109ba..06bbb15cb 100644 --- a/SQF/dayz_code/medical/publicEH/noDamage.sqf +++ b/SQF/dayz_code/medical/publicEH/noDamage.sqf @@ -1,8 +1,9 @@ // noDamage.sqf +private ["_unit"]; _unit = _this select 0; _unit setCaptive 3; _unit switchMove "AmovPpneMstpSnonWnonDnon_healed"; _unit allowDamage false; - sleep 0.01; + sleep 0.01; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/pickUp.sqf b/SQF/dayz_code/medical/publicEH/pickUp.sqf index 144c2c45a..157627570 100644 --- a/SQF/dayz_code/medical/publicEH/pickUp.sqf +++ b/SQF/dayz_code/medical/publicEH/pickUp.sqf @@ -1,5 +1,6 @@ // pickUp.sqf +private ["_unit"]; _unit = _this select 0; _unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/promptRName.sqf b/SQF/dayz_code/medical/publicEH/promptRName.sqf index 75ec85825..5bace5ec3 100644 --- a/SQF/dayz_code/medical/publicEH/promptRName.sqf +++ b/SQF/dayz_code/medical/publicEH/promptRName.sqf @@ -1,5 +1,6 @@ // promptRName.sqf +private ["_unit"]; _unit = _this select 0; call compile format ["server globalChat reviver_%1", _unit]; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/rolltoback.sqf b/SQF/dayz_code/medical/publicEH/rolltoback.sqf index 6e0d92e69..690609c99 100644 --- a/SQF/dayz_code/medical/publicEH/rolltoback.sqf +++ b/SQF/dayz_code/medical/publicEH/rolltoback.sqf @@ -1,6 +1,6 @@ // rolltoback.sqf +private ["_unit"]; _unit = _this select 0; -_unit switchMove "ainjppnemstpsnonwrfldnon_rolltoback"; - +_unit switchMove "ainjppnemstpsnonwrfldnon_rolltoback"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/rolltofront.sqf b/SQF/dayz_code/medical/publicEH/rolltofront.sqf index 9d70d3cb6..57f686db2 100644 --- a/SQF/dayz_code/medical/publicEH/rolltofront.sqf +++ b/SQF/dayz_code/medical/publicEH/rolltofront.sqf @@ -1,6 +1,6 @@ // rolltofront.sqf +private ["_unit"]; _unit = _this select 0; -_unit switchMove "ainjppnemstpsnonwrfldnon_rolltofront"; - +_unit switchMove "ainjppnemstpsnonwrfldnon_rolltofront"; \ No newline at end of file diff --git a/SQF/dayz_code/medical/publicEH/set180.sqf b/SQF/dayz_code/medical/publicEH/set180.sqf index 053762334..a01b06d18 100644 --- a/SQF/dayz_code/medical/publicEH/set180.sqf +++ b/SQF/dayz_code/medical/publicEH/set180.sqf @@ -1,5 +1,6 @@ // set180.sqf +private ["_dragee"]; _dragee = _this select 0; _dragee setDir 180; \ No newline at end of file diff --git a/SQF/dayz_code/medical/pulse.sqf b/SQF/dayz_code/medical/pulse.sqf index d8c475d0f..0a1501a25 100644 --- a/SQF/dayz_code/medical/pulse.sqf +++ b/SQF/dayz_code/medical/pulse.sqf @@ -1,4 +1,6 @@ // bleed.sqf + +private ["_unit","_isDead","_isCardiac"]; _unit = (_this select 3); _isDead = _unit getVariable["USEC_isDead",false]; _isCardiac = _unit getVariable["USEC_isCardiac",false]; diff --git a/SQF/dayz_code/medical/setup_functions_med.sqf b/SQF/dayz_code/medical/setup_functions_med.sqf index 166952be8..12e8a52a1 100644 --- a/SQF/dayz_code/medical/setup_functions_med.sqf +++ b/SQF/dayz_code/medical/setup_functions_med.sqf @@ -4,7 +4,7 @@ fnc_usec_damageHandle = { - Function - [unit] call fnc_usec_damageHandle; ************************************************************/ - private["_unit","_eh"]; + private ["_unit"]; _unit = _this select 0; // Remove handle damage override @@ -16,6 +16,8 @@ fnc_usec_damageHandle = { }; fnc_usec_pitchWhine = { + + private ["_visual","_sound"]; _visual = _this select 0; _sound = _this select 1; //affect the player @@ -33,14 +35,12 @@ fnc_usec_pitchWhine = { }; fnc_usec_damageUnconscious = { - private["_unit","_damage"]; + private ["_unit","_damage","_inVehicle"]; _unit = _this select 0; _damage = _this select 1; _inVehicle = (vehicle _unit != _unit); if (_unit == player) then { - r_player_timeout = round(((random 2) * _damage) * 40); - if (_type == 1) then {r_player_timeout = r_player_timeout + 90}; - if (_type == 2) then {r_player_timeout = r_player_timeout + 60}; + r_player_timeout = round((((random 2) max 0.1) * _damage) * 20); r_player_unconscious = true; player setVariable["medForceUpdate",true,true]; player setVariable ["unconsciousTime", r_player_timeout, true]; @@ -104,6 +104,8 @@ fnc_usec_damageGetWound = { }; fnc_usec_medic_removeActions = { + + private ["_obj"]; _obj = player; { _obj = _x; @@ -131,7 +133,7 @@ fnc_med_publicBlood = { }; fnc_usec_playerBleed = { - private["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime"]; + private ["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime","_id"]; _bleedTime = 400; //seconds _bleedPerSec = (r_player_bloodTotal / _bleedTime); _total = r_player_bloodTotal; @@ -170,7 +172,7 @@ fnc_usec_damageBleed = { - Function - [_unit, _wound, _injury] call fnc_usec_damageBleed; ************************************************************/ - private["_unit","_wound","_injury","_modelPos","_point","_source"]; + private ["_unit","_wound","_injury","_modelPos","_point","_source","_rndX"]; _unit = _this select 0; _wound = _this select 1; _injury = _this select 2; diff --git a/SQF/dayz_code/medical/transfusion.sqf b/SQF/dayz_code/medical/transfusion.sqf index 9adf9654b..dd33d8b45 100644 --- a/SQF/dayz_code/medical/transfusion.sqf +++ b/SQF/dayz_code/medical/transfusion.sqf @@ -1,4 +1,4 @@ -private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused","_text"]; +private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"]; // bleed.sqf _unit = (_this select 3) select 0; //_lowBlood = _unit getVariable ["USEC_lowBlood", false]; diff --git a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf index d0e1a50a7..eba2ebd58 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf @@ -1,4 +1,5 @@ +private ["_fl","_sm","_expl","_dr","_tv","_i","_wave","_splash","_velz","_v","_int","_t","_pos"]; _v=_this select 0; _int = (fuel _v)*(8+random 2); _t=time; diff --git a/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf b/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf index 82c26ddc4..0ffcb3948 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf @@ -1,3 +1,5 @@ + +private ["_dr","_pos","_xv","_yv","_dir","_Crater","_speed","_velz","_tv","_zv","_shards","_i","_smoke","_fire","_dirt","_int","_t","_v"]; _int = _this select 1; _t=_this select 2; _pos=getpos _v; diff --git a/SQF/dayz_code/system/BIS_Effects/killed.sqf b/SQF/dayz_code/system/BIS_Effects/killed.sqf index 5ab6a6002..d17452d11 100644 --- a/SQF/dayz_code/system/BIS_Effects/killed.sqf +++ b/SQF/dayz_code/system/BIS_Effects/killed.sqf @@ -1,4 +1,4 @@ -private ["_v","_int","_t"]; +private ["_v","_int","_t","_b"]; _v=_this select 0; if (_v iskindof "helicopter" || _v iskindof "plane") then diff --git a/SQF/dayz_code/system/antihack.sqf b/SQF/dayz_code/system/antihack.sqf index 01c76a410..c639b99e7 100644 --- a/SQF/dayz_code/system/antihack.sqf +++ b/SQF/dayz_code/system/antihack.sqf @@ -4,7 +4,7 @@ Refactored By Alby */ -private["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed"]; +private ["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed","_debug"]; waitUntil {vehicle player == player}; diff --git a/SQF/dayz_code/system/building_monitor.sqf b/SQF/dayz_code/system/building_monitor.sqf index 837a0bd99..64da41701 100644 --- a/SQF/dayz_code/system/building_monitor.sqf +++ b/SQF/dayz_code/system/building_monitor.sqf @@ -1,4 +1,4 @@ -private["_building","_GroupMarker","_list","_nearby","_run"]; +private ["_building","_GroupMarker","_nearby","_run","_items"]; _building = _this select 0; _GroupMarker = _this select 1; _items = _this select 2; @@ -15,5 +15,4 @@ while {_run} do { }; {deleteVehicle _x;} forEach _items; - _building setVariable ["looted",(DateToNumber date),true]; \ No newline at end of file diff --git a/SQF/dayz_code/system/player_spawn_1.sqf b/SQF/dayz_code/system/player_spawn_1.sqf index 649ee4e78..8604a6b2b 100644 --- a/SQF/dayz_code/system/player_spawn_1.sqf +++ b/SQF/dayz_code/system/player_spawn_1.sqf @@ -1,4 +1,4 @@ -private["_handle","_body","_cursor","_delMe"]; +private ["_handle","_cursor","_delMe","_first","_town","_day","_world","_nearestCity"]; while {true} do { _handle = [] spawn player_animalCheck; waitUntil{scriptDone _handle}; diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index dcdab85b6..37d7cd352 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -1,4 +1,4 @@ -private ["_refObj","_size","_vel","_speed","_hunger","_thirst","_timeOut","_result","_factor","_randomSpot","_mylastPos","_distance","_lastTemp","_rnd","_listTalk","_bloodChanged","_id","_messTimer","_display","_control","_combatdisplay","_combatcontrol","_timeleft","_inVehicle","_tempPos","_lastUpdate","_foodVal","_thirstVal","_lowBlood","_startcombattimer","_combattimeout","_myPos","_lastPos","_debug","_saveTime","_maxDistanceTravel","_maxDistanceDebug","_maxDistanceZeroPos","_maxDistancePlayer","_maxDistanceVehicle"]; +private ["_refObj","_size","_vel","_speed","_hunger","_thirst","_timeOut","_result","_factor","_randomSpot","_mylastPos","_distance","_lastTemp","_rnd","_listTalk","_bloodChanged","_id","_messTimer","_display","_control","_combatdisplay","_combatcontrol","_timeleft","_inVehicle","_tempPos","_lastUpdate","_foodVal","_thirstVal","_lowBlood","_startcombattimer","_combattimeout","_myPos","_lastPos","_debug","_saveTime","_maxDistanceTravel","_maxDistanceDebug","_maxDistanceZeroPos","_maxDistancePlayer","_maxDistanceVehicle","_isPZombie"]; disableSerialization; _timeOut = 0; _messTimer = 0;