diff --git a/@DayZRedux/Addons/dayz_code/CfgActions.hpp b/@DayZRedux/Addons/dayz_code/CfgActions.hpp
index 28bbfc1..af9645e 100644
--- a/@DayZRedux/Addons/dayz_code/CfgActions.hpp
+++ b/@DayZRedux/Addons/dayz_code/CfgActions.hpp
@@ -10,7 +10,9 @@ class CfgActions {
class Rearm : None {
show = 0;
};
-
+ class HideBody : None {
+ show = 0;
+ };
/*
class Gear : None {
show = 0;
diff --git a/@DayZRedux/Addons/dayz_code/CfgBuildingLoot.hpp b/@DayZRedux/Addons/dayz_code/CfgBuildingLoot.hpp
index fcdf07f..9026f15 100644
--- a/@DayZRedux/Addons/dayz_code/CfgBuildingLoot.hpp
+++ b/@DayZRedux/Addons/dayz_code/CfgBuildingLoot.hpp
@@ -89,7 +89,7 @@ class CfgBuildingLoot {
zombieChance = 0.3;
maxRoaming = 2;
zombieClass[] = {"zZambie_Base", "z_hunter", "z_teacher", "z_villager1", "z_villager2", "z_villager3"};
- lootChance = 0.3;
+ lootChance = 0.45;
lootPos[] = {};
//itemType[] = {{"ItemSodaMdew", "magazine"}, {"ItemWatch", "generic"}, {"ItemCompass", "generic"}, {"ItemMap", "weapon"}, {"Makarov", "weapon"}, {"Colt1911", "weapon"}, {"ItemFlashlight", "generic"}, {"ItemKnife", "generic"}, {"ItemMatchbox", "generic"}, {"", "generic"}, {"LeeEnfield", "weapon"}, {"revolver_EP1", "weapon"}, {"CZ_VestPouch_EP1", "object"}, {"DZ_CivilBackpack_EP1", "object"}, {"DZ_ALICE_Pack_EP1", "object"}, {"Winchester1866", "weapon"}, {"WeaponHolder_ItemTent", "object"}, {"", "military"}, {"", "trash"}, {"Crossbow_DZ", "weapon"}, {"Binocular", "weapon"}, {"PartWoodPile", "magazine"}, {"Skin_Camo1_DZ", "magazine"}, {"Skin_Sniper1_DZ", "magazine"}, {"WeaponHolder_MeleeCrowbar", "object"}, {MR43, "weapon"}};
//itemChance[] = {0.01, 0.15, 0.05, 0.03, 0.13, 0.05, 0.03, 0.08, 0.06, 2, 0.06, 0.04, 0.01, 0.03, 0.03, 0.01, 0.01, 0.03, 0.5, 0.01, 0.06, 0.06, 0.01, 0.01, 0.08, 0.03};
@@ -146,7 +146,7 @@ class CfgBuildingLoot {
zombieChance = 0.4;
zombieClass[] = {"z_worker1", "z_worker2", "z_worker3"};
maxRoaming = 2;
- lootChance = 0.2;
+ lootChance = 0.4;
lootPos[] = {};
//itemType[] = {{"", "generic"}, {"", "trash"}, {"", "military"}, {"WeaponHolder_PartGeneric", "object"}, {"WeaponHolder_PartWheel", "object"}, {"WeaponHolder_PartFueltank", "object"}, {"WeaponHolder_PartEngine", "object"}, {"WeaponHolder_PartGlass", "object"}, {"WeaponHolder_PartVRotor", "object"}, {"WeaponHolder_ItemJerrycan", "object"}, {"WeaponHolder_ItemHatchet", "object"}, {"ItemKnife", "military"}, {"ItemToolbox", "weapon"}, {"ItemWire", "magazine"}, {"ItemTankTrap", "magazine"}};
//itemChance[] = {0.18, 0.29, 0.04, 0.04, 0.05, 0.02, 0.01, 0.04, 0.01, 0.04, 0.11, 0.07, 0.02, 0.06, 0.04};
@@ -188,7 +188,7 @@ class CfgBuildingLoot {
zombieChance = 0.4;
zombieClass[] = {"z_worker1", "z_worker2", "z_worker3"};
maxRoaming = 3;
- lootChance = 0.2;
+ lootChance = 0.3;
lootPos[] = {};
//itemType[] = {{"", "generic"}, {"", "trash"}, {"", "military"}, {"WeaponHolder_PartGeneric", "object"}, {"WeaponHolder_PartWheel", "object"}, {"WeaponHolder_PartFueltank", "object"}, {"WeaponHolder_PartEngine", "object"}, {"WeaponHolder_PartGlass", "object"}, {"WeaponHolder_PartVRotor", "object"}, {"WeaponHolder_ItemJerrycan", "object"}, {"WeaponHolder_ItemHatchet", "object"}, {"ItemKnife", "military"}, {"ItemToolbox", "weapon"}, {"ItemWire", "magazine"}, {"ItemTankTrap", "magazine"}};
//itemChance[] = {0.18, 0.29, 0.04, 0.04, 0.05, 0.02, 0.01, 0.04, 0.01, 0.04, 0.11, 0.07, 0.02, 0.06, 0.04};
@@ -246,8 +246,8 @@ class CfgBuildingLoot {
{"PartWoodPile", "magazine"},
{"WeaponHolder_ItemHatchet", "object"},
{MR43, "weapon"},
- {"TrapBear", "magazine"},
- {"WeaponHolder_ItemMachete"}
+ //{"TrapBear", "magazine"},
+ {"WeaponHolder_ItemMachete", "object"}
};
itemChance[] = {
0.06, //WeaponHolder_ItemJerrycan
@@ -259,13 +259,13 @@ class CfgBuildingLoot {
0.15, //PartWoodPile
0.12, //WeaponHolder_ItemHatchet
0.1, //MR43
- 0.02, //TrapBear
+ //0.02, //TrapBear
0.12 //Machete
};
};
class Supermarket : Default {
- lootChance = 0.3;
+ lootChance = 0.5;
minRoaming = 2;
maxRoaming = 6;
zombieChance = 0.3;
@@ -279,12 +279,13 @@ class CfgBuildingLoot {
{"ItemMap", "generic"},
{"Makarov", "weapon"},
{"Colt1911", "weapon"},
+ {"p220", "weapon"},
{"ItemKnife", "generic"},
{"ItemMatchbox", "generic"},
{"", "generic"},
{"revolver_EP1", "weapon"},
- {"DZ_Assault_Pack_EP1","object"}, // 12
- {"DZ_Czech_Vest_Puch","object"}, // 12-0
+ {"DZ_Assault_Pack_EP1", "object"}, // 12
+ {"DZ_Czech_Vest_Puch", "object"}, // 12-0
{"DZ_Patrol_Pack_EP1", "object"},
{"WeaponHolder_ItemTent", "object"},
{"", "food"},
@@ -300,6 +301,7 @@ class CfgBuildingLoot {
0.05, //ItemMap
0.03, //Makarov
0.03, //Colt1911
+ 0.03, //p220
0.03, //ItemKnife
0.05, //ItemMatchbox
0.6, //generic
@@ -331,8 +333,10 @@ class CfgBuildingLoot {
{M16A4_ACG, "weapon"},
{FN_FAL, "weapon"},
{"Mk_48_DZ", "weapon"},
+ {"ch_minimi", "weapon"},
{M249_DZ, "weapon"},
{M40A3, "weapon"},
+ {Sa58V_RCO_EP1, "weapon"},
{SCAR_H_CQC_CCO, "weapon"},
{AK_107_pso, "weapon"},
{"", "military"},
@@ -354,8 +358,10 @@ class CfgBuildingLoot {
0.02, //M16A4_ACG
0.01, //FN_FAL
0.01, //Mk_48_DZ
+ 0.01, //ch_minimi
0.01, //M249_DZ
0.01, //M40A3
+ 0.01, //Sa58V_RCO_EP1
0.01, //SCAR_H_CQC_CCO
0.01, //AK_107_pso
1.1, //military
@@ -363,10 +369,10 @@ class CfgBuildingLoot {
0.25, //MedBawx0
0.01, //NVGoggles
0.5, //AmmoBawxSmall_762_556_545
- 0.01, //MP5SD
- 0.01, //M9SD
- 0.3, //Skin_Camo1_DZ
- 0.3, //Skin_Bait1_DZ
+ 0.02, //MP5SD
+ 0.02, //M9SD
+ 0.1, //Skin_Camo1_DZ
+ 0.1, //Skin_Bait1_DZ
0.1, //Skin_Uniform1_DZ
0.1 //Skin_Sniper1_DZ
};
@@ -436,15 +442,17 @@ class CfgBuildingLoot {
{"NVGoggles", "weapon"},
{"", "bloodbags"},
{"M9", "weapon"},
+ {"sapr_aimpoint", "weapon"},
{"glock17_EP1", "weapon"},
{"Skin_Bait1_DZ", "magazine"},
{"Skin_Camo1_DZ", "magazine"}
};
itemChance[] = {
0.15, //ItemGPS
- 0.01, //NVGoggles
+ 0.04, //NVGoggles
0.5, //bloodbags
0.75, //M9
+ 0.15, //sapr_aimpoint
0.5, //glock17_EP1
0.3, //Skin_Bait1_DZ
0.25 //Skin_Camo1_DZ
@@ -483,6 +491,7 @@ class CfgBuildingLoot {
{G36A_camo, "weapon"},
{M9SD, "weapon"},
{FN_FAL, "weapon"},
+ {sg551_commando_lg97_aim_camo, "weapon"},
{"DZ_British_ACU", "object"},
{"M4A1_Aim", "weapon"},
{"Binocular", "weapon"},
@@ -494,6 +503,7 @@ class CfgBuildingLoot {
0.1, //G36A_camo
0.1, //M9SD
0.1, //FN_FAL
+ 0.1, //sg551_commando_lg97_aim_camo
0.4, //DZ_British_ACU
0.2, //M4A1_Aim
0.7, //Binocular
@@ -577,7 +587,7 @@ class CfgBuildingLoot {
zombieChance = 0.3;
maxRoaming = 6;
zombieClass[] = {"z_soldier", "z_soldier_heavy", "z_policeman"};
- lootChance = 0.3;
+ lootChance = 0.4;
lootPos[] = {};
//itemType[] = {{"M9", "weapon"}, {M16A2, "weapon"}, {M16A2GL, "weapon"}, {M9SD, "weapon"}, {AK_47_M, "weapon"}, {AK_74, "weapon"}, {"M4A1_Aim", "weapon"}, {"AKS_74_kobra", "weapon"}, {AKS_74_U, "weapon"}, {AK_47_M, "weapon"}, {M24, "weapon"}, {M1014, "weapon"}, {DMR, "weapon"}, {M4A1, "weapon"}, {M14_EP1, "weapon"}, {UZI_EP1, "weapon"}, {"Remington870_lamp", "weapon"}, {"glock17_EP1", "weapon"}, {MP5A5, "weapon"}, {MP5SD, "weapon"}, {M4A3_CCO_EP1, "weapon"}, {"Binocular", "weapon"}, {"ItemFlashlightRed", "military"}, {"ItemKnife", "military"}, {"ItemGPS", "weapon"}, {"ItemMap", "military"}, {"DZ_Assault_Pack_EP1", "object"}, {"DZ_Patrol_Pack_EP1", "object"}, {"DZ_Backpack_EP1", "object"}, {"", "medical"}, {"", "generic"}, {"", "military"}, {"ItemEtool", "weapon"}, {"ItemSandbag", "magazine"}};
//itemChance[] = {0.05, 0.05, 0.01, 0.02, 0.2, 0.15, 0.01, 0.08, 0.05, 0.05, 0.01, 0.1, 0.01, 0.02, 0.01, 0.05, 0.08, 0.1, 0.04, 0.02, 0.01, 0.06, 0.1, 0.1, 0.01, 0.05, 0.06, 0.04, 0.02, 0.1, 1.0, 2.5, 0.05, 0.02};
@@ -593,6 +603,7 @@ class CfgBuildingLoot {
{UZI_EP1, "weapon"},
{"Remington870_lamp", "weapon"},
{"glock17_EP1", "weapon"},
+ {"p226", "weapon"},
{MP5A5, "weapon"},
{Sa58P_EP1, "weapon"},
{"Binocular", "weapon"},
@@ -623,6 +634,7 @@ class CfgBuildingLoot {
0.05, //UZI_EP1
0.15, //Remington870_lamp
0.15, //glock17_EP1
+ 0.1, //p226
0.1, //MP5A5
0.08, //Sa58P_EP1
0.06, //Binocular
@@ -668,9 +680,10 @@ class CfgBuildingLoot {
{"glock17_EP1", "weapon"},
{M16A4_ACG, "weapon"},
{BAF_L85A2_UGL_Holo, "weapon"},
- {Sa58V_RCO_EP1, "weapon"},
+ {bizon_silenced, "weapon"},
{"M4A1_HWS_GL_camo", "weapon"},
{M4A3_CCO_EP1, "weapon"},
+ {sg552_mp_aimpoint, "weapon"},
{"AmmoBawxSmall_762_556_545", "object"},
{"NVGoggles", "weapon"},
{"Binocular", "weapon"},
@@ -679,7 +692,7 @@ class CfgBuildingLoot {
{"ItemGPS", "weapon"},
{"ItemMap", "military"},
{"Binocular_Vector", "military"},
- {"DZ_British_ACU","object"}, // 18
+ {"DZ_British_ACU","object"},
{"DZ_ALICE_Pack_EP1", "object"},
{"DZ_Backpack_EP1", "object"},
{"", "medical"},
@@ -706,9 +719,10 @@ class CfgBuildingLoot {
0.25, //glock17_EP1
0.01, //M16A4_ACG
0.01, //BAF_L85A2_UGL_Holo
- 0.01, //Sa58V_RCO_EP1
+ 0.05, //bizon_silenced
0.01, //M4A1_HWS_GL_camo
0.01, //M4A3_CCO_EP1
+ 0.05, //sg552_mp_aimpoint
0.04, //AmmoBawxSmall_762_556_545
0.01, //NVGoggles
0.15, //Binocular
@@ -721,7 +735,7 @@ class CfgBuildingLoot {
0.03, //DZ_ALICE_Pack_EP1
0.02, //DZ_Backpack_EP1
0.3, //medical
- 3.6, //generic
+ 3.0, //generic
5.0, //military
0.01, //Skin_Camo1_DZ
0.03, //Skin_Bait1_DZ
@@ -881,12 +895,12 @@ class CfgBuildingLoot {
};
class Land_a_stationhouse : Military {
- lootChance = 0.2;
+ lootChance = 0.3;
lootPos[] = {{-2.69922, -7.57422, -9.47058}, {-0.892578, -5.7168, -9.47058}, {-3.2417, -6.61914, -4.6489}, {-1.35645, -8.3623, -4.6489}, {-1.70801, -7.85449, -0.0437927}, {-3.39502, -7.88281, -0.0437927}, {-1.396, -7.79883, 4.41141}, {-1.37939, -5.79102, 4.41141}, {1.5127, 1.96484, -9.47058}, {18.9058, -4.06738, -9.47058}};
};
class Land_Mil_ControlTower : Military {
- lootChance = 0.3;
+ lootChance = 0.35;
lootPos[] = {{10.0703, 3.76367, -9.62869}, {3.89844, 3.43457, -5.46368}, {1.75195, 5.68164, -5.46368}, {6.66113, -0.625488, -1.0687}, {2.63965, -0.191406, -1.0687}, {6.72266, 3.23389, -1.0687}};
};
@@ -958,7 +972,7 @@ class CfgBuildingLoot {
minRoaming = 3;
maxRoaming = 9;
zombieClass[] = {"z_soldier", "z_soldier_heavy", "z_policeman"};
- lootChance = 0.3;
+ lootChance = 0.4;
lootPos[] = {{-4.66113, -6.27173, -18.429}, {3.31641, -5.77417, -18.429}, {-0.20752, -6.48682, -18.429}, {-9.72412, -4.88745, -3.78903}, {-9.57813, 3.55615, -3.78903}, {-7.16797, 11.0737, -3.78903}, {5.07422, 11.1838, -3.78903}, {9.3208, 5.38623, -3.78903}, {9.65332, -4.82056, -3.78903}, {3.23535, -0.105957, -0.169027}, {4.85205, -3.69019, -0.169027}, {-0.80127, -7.89087, -0.169027}, {-4.4082, -4.91772, -0.169027}, {-4.90771, -2.23169, -0.169027}};
};
@@ -1122,7 +1136,7 @@ class CfgBuildingLoot {
class Land_Misc_deerstand: Hunting {
zombieChance = 0.3;
- lootChance = 0.4;
+ lootChance = 0.45;
maxRoaming = 3;
lootPos[] = {{-0.923828,-0.808594,1.08539},{0.419922,-0.237305,1.08539}};
}; // Qty: 56
@@ -1144,7 +1158,7 @@ class CfgBuildingLoot {
class MASH : Hospital {
maxRoaming = 1;
- lootChance = 0.3;
+ lootChance = 0.4;
lootPos[] = {{1.18213, -1.65039, -1.17793}, {0.24707, 0.799316, -1.17803}};
};
@@ -1216,7 +1230,7 @@ class CfgBuildingLoot {
zombieChance = 0;
minRoaming = 0;
maxRoaming = 0;
- lootChance = 0.2;
+ lootChance = 0.35;
};
class SeaOneDirty_RX : MilitarySpecial {
@@ -1232,7 +1246,7 @@ class CfgBuildingLoot {
zombieChance = 0;
minRoaming = 0;
maxRoaming = 0;
- lootChance = 0.2;
+ lootChance = 0.3;
lootPos[] = {{1.02637, -0.665527, 1.0943}, {1.03223, -3.38086, 1.09433}, {5.70996, -4.4126, 1.00467}};
};
diff --git a/@DayZRedux/Addons/dayz_code/CfgChernarusRedux.hpp b/@DayZRedux/Addons/dayz_code/CfgChernarusRedux.hpp
index c3151ff..e6cfd43 100644
--- a/@DayZRedux/Addons/dayz_code/CfgChernarusRedux.hpp
+++ b/@DayZRedux/Addons/dayz_code/CfgChernarusRedux.hpp
@@ -2743,4 +2743,305 @@ class CfgChernarusRedux {
onFire = 0;
};
};
+ class zelenoBase {
+ buildings = 8;
+
+ class Object0 {
+ type = "MASH_EP1";
+ position[] = {2476.4666, 5084.8398, -1.5258789e-005};
+ direction = 56.32555;
+ onFire = 0;
+ };
+
+ class Object1 {
+ type = "MASH_EP1";
+ position[] = {2481.5808, 5077.5659, -1.5258789e-005};
+ direction = 56.32555;
+ onFire = 0;
+ };
+
+ class Object2 {
+ type = "HeliHRescue";
+ position[] = {2494.8633, 5091.8286, -4.5776367e-005};
+ direction = -393.62851;
+ onFire = 0;
+ };
+
+ class Object3 {
+ type = "CampEast";
+ position[] = {2507.4175, 5109.4341};
+ direction = 55.140976;
+ onFire = 0;
+ };
+
+ class Object4 {
+ type = "CampEast";
+ position[] = {2515.9246, 5096.7715, -0.029805351};
+ direction = 55.140976;
+ onFire = 0;
+ };
+
+ class Object5 {
+ type = "PowGen_Big";
+ position[] = {2511.2556, 5103.1777, 1.5258789e-005};
+ direction = 53.937569;
+ onFire = 0;
+ };
+
+ class Object6 {
+ type = "Camp_EP1";
+ position[] = {2489.6343, 5107.4336, 1.5258789e-005};
+ direction = 144.43239;
+ onFire = 0;
+ };
+
+ class Object7 {
+ type = "Camp_EP1";
+ position[] = {2481.7903, 5102.1172, 1.5258789e-005};
+ direction = 144.43239;
+ onFire = 0;
+ };
+ class Object8 {
+ type = "Land_fort_rampart";
+ position[] = {2455.7881, 5106.3516, 0.41972083};
+ direction = -103.73354;
+ onFire = 0;
+ };
+ class Object9 {
+ type = "Land_HBarrier_large";
+ position[] = {2336.8105, 5261.6685, 0.11917596};
+ direction = 59.349693;
+ onFire = 0;
+ };
+ class Object10 {
+ type = "Misc_cargo_cont_net2";
+ position[] = {2494.9756, 5117.7515, -1.5258789e-005};
+ direction = 0;
+ onFire = 0;
+ };
+
+ class Object11 {
+ type = "Misc_concrete_High";
+ position[] = {2484.5544, 5072.1309, -0.26034766};
+ direction = 0;
+ onFire = 0;
+ };
+
+ class Object12 {
+ type = "Misc_concrete_High";
+ position[] = {2488.3452, 5066.2686, -0.20296618};
+ direction = -210.15285;
+ onFire = 0;
+ };
+
+ class Object13 {
+ type = "HMMWVWreck";
+ position[] = {2523.2227, 5086.8369};
+ direction = 92.158646;
+ onFire = 0;
+ };
+
+ class Object14 {
+ type = "USMC_WarfareBContructionSite";
+ position[] = {2491.5566, 5064.8784, -0.075202405};
+ direction = 55.845348;
+ onFire = 0;
+ };
+
+ class Object15 {
+ type = "USMC_WarfareBContructionSite1";
+ position[] = {2496.6924, 5060.7461, -0.073571742};
+ direction = -33.338867;
+ onFire = 0;
+ };
+
+ class Object16 {
+ type = "Base_WarfareBContructionSite";
+ position[] = {2527.6191, 5076.5869, -0.082194753};
+ direction = 60.323608;
+ onFire = 0;
+ };
+
+ class Object17 {
+ type = "Sign_Checkpoint_US_EP1";
+ position[] = {2521.8918, 5048.0811, -0.099054337};
+ direction = -65.795303;
+ onFire = 0;
+ };
+
+ class Object18 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2513.5476, 5054.2466, -0.095101967};
+ direction = 57.286171;
+ onFire = 0;
+ };
+
+ class Object19 {
+ type = "Land_GuardShed";
+ position[] = {2518.9758, 5049.7896, 0};
+ direction = -32.529079;
+ onFire = 0;
+ };
+
+ class Object20 {
+ type = "Sign_Checkpoint_US_EP1";
+ position[] = {2527.9993, 5052.4497, -1.5258789e-005};
+ direction = -7.1848273;
+ onFire = 0;
+ };
+
+ class Object21 {
+ type = "ZavoraAnim";
+ position[] = {2521.6812, 5049.0366, -1.5258789e-005};
+ direction = 145.67616;
+ onFire = 0;
+ };
+
+ class Object22 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2529.1152, 5072.9814, -0.064199612};
+ direction = -31.717268;
+ onFire = 0;
+ };
+
+ class Object23 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2502.356, 5055.9141, -0.17297229};
+ direction = -31.576075;
+ onFire = 0;
+ };
+
+ class Object24 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2532.5337, 5083.6011, -0.064459577};
+ direction = -121.97787;
+ onFire = 0;
+ };
+
+ class Object25 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2532.5337, 5083.6011, -0.064459577};
+ direction = -121.97787;
+ onFire = 0;
+ };
+
+ class Object26 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2524.1519, 5097.001, -0.23065968};
+ direction = -121.97787;
+ onFire = 0;
+ };
+
+ class Object27 {
+ type = "UralWreck";
+ position[] = {2517.6631, 5072.6655, -0.15839215};
+ direction = 18.12393;
+ onFire = 0;
+ };
+
+ class Object28 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2515.8174, 5110.2075, -0.23257388};
+ direction = -121.97787;
+ onFire = 0;
+ };
+
+ class Object29 {
+ type = "Base_WarfareBBarrier5x";
+ position[] = {2509.731, 5120.0991, -0.2319622};
+ direction = 56.750393;
+ onFire = 0;
+ };
+
+ class Object30 {
+ type = "Base_WarfareBBarrier5x";
+ position[] = {2492.4243, 5049.8501, -0.26570606};
+ direction = -29.952065;
+ onFire = 0;
+ };
+
+ class Object31 {
+ type = "Misc_cargo_cont_net2";
+ position[] = {2495.99, 5120.8418, 0.009138111};
+ direction = -26.312235;
+ onFire = 0;
+ };
+
+ class Object32 {
+ type = "Land_CamoNet_EAST";
+ position[] = {2471.0293, 5110.8057, -0.3143149};
+ direction = -19.897068;
+ onFire = 0;
+ };
+
+ class Object33 {
+ type = "Mass_grave";
+ position[] = {2470.9402, 5110.1079, -0.070633642};
+ direction = 78.451927;
+ onFire = 0;
+ };
+
+ class Object34 {
+ type = "Land_HBarrier1";
+ position[] = {2488.6096, 5047.4468, -0.22254181};
+ direction = 56.553539;
+ onFire = 0;
+ };
+
+ class Object35 {
+ type = "Land_HBarrier1";
+ position[] = {2487.2322, 5046.6226, -0.2266899};
+ direction = 56.553539;
+ onFire = 0;
+ };
+
+ class Object36 {
+ type = "Land_HBarrier1";
+ position[] = {2507.2974, 5123.8989, -0.15526646};
+ direction = 154.18748;
+ onFire = 0;
+ };
+
+ class Object37 {
+ type = "Land_HBarrier1";
+ position[] = {2506.6821, 5124.8887, -0.15071738};
+ direction = 160.70088;
+ onFire = 0;
+ };
+
+ class Object38 {
+ type = "Land_HBarrier1";
+ position[] = {2505.9773, 5125.9448, -0.15589157};
+ direction = 73.077614;
+ onFire = 0;
+ };
+
+ class Object39 {
+ type = "T72Wreck";
+ position[] = {2505.9648, 5076.8267, -0.036877852};
+ direction = -66.36837;
+ onFire = 0;
+ };
+
+ class Object40 {
+ type = "T72WreckTurret";
+ position[] = {2502.3977, 5072.1021, -0.039120257};
+ direction = 0;
+ onFire = 0;
+ };
+
+ class Object41 {
+ type = "Base_WarfareBBarrier10x";
+ position[] = {2526.1904, 5062.4111, 1.5258789e-005};
+ direction = 57.286171;
+ onFire = 0;
+ };
+
+ class Object42 {
+ type = "Land_GuardShed";
+ position[] = {2528.0037, 5055.5322, -1.5258789e-005};
+ direction = -32.529079;
+ onFire = 0;
+ };
+ };
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/CfgLoot.hpp b/@DayZRedux/Addons/dayz_code/CfgLoot.hpp
index 8505a74..9151660 100644
--- a/@DayZRedux/Addons/dayz_code/CfgLoot.hpp
+++ b/@DayZRedux/Addons/dayz_code/CfgLoot.hpp
@@ -5,13 +5,13 @@ class CfgLoot {
civilian[] = {{"TrashTinCan", "TrashJackDaniels", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "FoodCanBakedBeans", "FoodCanSardines", "FoodCanFrankBeans", "FoodCanPasta", "8Rnd_9x18_Makarov", "7Rnd_45ACP_1911", "2Rnd_shotgun_74Slug", "2Rnd_shotgun_74Pellets", "ItemBandage", "ItemPainkiller"}, {0.09, 0.09, 0.09, 0.12, 0.09, 0.05, 0.05, 0.05, 0.05, 0.07, 0.05, 0.05, 0.05, 0.06, 0.06}};
food[] = {{"TrashTinCan", "TrashJackDaniels", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "FoodCanBakedBeans", "FoodCanSardines", "FoodCanFrankBeans", "FoodCanPasta", "ItemBandage", "FoodCanTourist", "FoodCanMilk"}, {0.2, 0.2, 0.13, 0.08, 0.13, 0.08, 0.08, 0.08, 0.08, 0.04, 0.06, 0.06}};
//generic[] = {{"TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "TrashJackDaniels", "FoodCanBakedBeans", "FoodCanSardines", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled", "ItemWaterbottle", "ItemBandage", "7Rnd_45ACP_1911", "5x_22_LR_17_HMR", "10x_303", "6Rnd_45ACP", "2Rnd_shotgun_74Slug", "2Rnd_shotgun_74Pellets", "8Rnd_9x18_Makarov", "15Rnd_W1866_Slug", "WoodenArrow", "HandRoadFlare", "ItemPainkiller", "HandChemGreen", "HandChemBlue", "HandChemRed", "ItemHeatPack"}, {0.06, 0.06, 0.06, 0.04, 0.04, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.11, 0.03, 0.01, 0.04, 0.04, 0.05, 0.05, 0.09, 0.02, 0.04, 0.07, 0.02, 0.01, 0.03, 0.03, 0.04}};
- generic[] = {{"TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "TrashJackDaniels", "FoodCanBakedBeans", "FoodCanSardines", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled", "ItemWaterbottle", "ItemBandage", "7Rnd_45ACP_1911", "10x_303_RX", "6Rnd_45ACP", "2Rnd_shotgun_74Slug", "2Rnd_shotgun_74Pellets", "8Rnd_9x18_Makarov", "15Rnd_W1866_Slug", "WoodenArrow", "HandRoadFlare", "ItemPainkiller", "HandChemGreen", "HandChemBlue", "HandChemRed", "ItemHeatPack"}, {0.06, 0.06, 0.06, 0.04, 0.04, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.11, 0.03, 0.04, 0.04, 0.05, 0.05, 0.09, 0.02, 0.04, 0.07, 0.02, 0.01, 0.03, 0.03, 0.04}};
+ generic[] = {{"TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "TrashJackDaniels", "FoodCanBakedBeans", "FoodCanSardines", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled", "ItemWaterbottle", "ItemBandage", "7Rnd_45ACP_1911", "10x_303_RX", "6Rnd_45ACP", "2Rnd_shotgun_74Slug", "2Rnd_shotgun_74Pellets", "8Rnd_9x18_Makarov", "15Rnd_W1866_Slug", "WoodenArrow", "HandRoadFlare", "ItemPainkiller", "HandChemGreen", "HandChemBlue", "HandChemRed", "ItemHeatPack", "15Rnd_9x19_LUGER", "9Rnd_9x19_LUGER"}, {0.06, 0.06, 0.06, 0.04, 0.04, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.11, 0.03, 0.04, 0.04, 0.05, 0.05, 0.09, 0.02, 0.04, 0.07, 0.02, 0.01, 0.03, 0.03, 0.04, 0.02, 0.04}};
medical[] = {{"ItemBandage", "ItemPainkiller", "ItemMorphine", "ItemEpinephrine", "ItemHeatPack", "ItemAntibiotic"}, {1, 0.5, 0.5, 0.2, 0.1, 0.03}};
//hospital[] = {{"ItemBandage", "ItemPainkiller", "ItemMorphine", "ItemEpinephrine", "ItemBloodbag", "ItemAntibiotic"}, {0.43, 0.17, 0.13, 0.09, 0.17, 0.02}};
hospital[] = {{"ItemBandage", "ItemPainkiller", "ItemMorphine", "ItemEpinephrine", "ItemBloodbag", "ItemAntibiotic", "ItemChloroform"}, {0.43, 0.17, 0.13, 0.09, 0.17, 0.04, 0.03}};
//military[] = {{"TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "ItemBandage", "ItemPainkiller", "ItemMorphine", "30Rnd_556x45_Stanag", "20Rnd_762x51_DMR", "17Rnd_9x19_glock17", "15Rnd_9x19_M9SD", "15Rnd_9x19_M9", "30Rnd_762x39_AK47", "30Rnd_545x39_AK", "5Rnd_762x51_M24", "10Rnd_127x99_m107", "8Rnd_B_Beneli_74Slug", "1Rnd_HE_M203", "FlareWhite_M203", "FlareGreen_M203", "1Rnd_Smoke_M203", "200Rnd_556x45_M249", "HandGrenade_west", "SmokeShell", "SmokeShellRed", "SmokeShellGreen", "8Rnd_B_Beneli_Pellets", "30Rnd_556x45_StanagSD", "30Rnd_9x19_MP5", "30Rnd_9x19_MP5SD", "100Rnd_762x51_M240", "HandChemGreen", "HandChemBlue", "HandChemRed", "ItemHeatPack"}, {0.18, 0.09, 0.01, 0.01, 0.04, 0.04, 0.01, 0.04, 0.04, 0.05, 0.01, 0.02, 0.04, 0.04, 0.01, 0.01, 0.04, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.04, 0.02, 0.02, 0.04, 0.01, 0.02, 0.01, 0.01, 0.02, 0.02, 0.02, 0.04}};
- military[] = {{"TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "ItemBandage", "ItemPainkiller", "ItemMorphine", "30Rnd_556x45_Stanag", "17Rnd_9x19_glock17", "15Rnd_9x19_M9", "30Rnd_762x39_AK47", "30Rnd_545x39_AK", "8Rnd_B_Beneli_74Slug", "1Rnd_HE_M203", "FlareWhite_M203", "FlareGreen_M203", "1Rnd_Smoke_M203", "HandGrenade_west", "SmokeShell", "SmokeShellRed", "SmokeShellGreen", "8Rnd_B_Beneli_Pellets", "30Rnd_9x19_MP5", "HandChemGreen", "HandChemBlue", "HandChemRed", "ItemHeatPack","30Rnd_762x39_SA58","20Rnd_762x51_B_SCAR"}, {0.18, 0.09, 0.01, 0.01, 0.04, 0.04, 0.01, 0.04, 0.05, 0.02, 0.04, 0.04, 0.04, 0.01, 0.01, 0.01, 0.01, 0.01, 0.04, 0.02, 0.02, 0.04, 0.02, 0.02, 0.02, 0.02, 0.04, 0.04, 0.01}};
- policeman[] = {{"ItemBandage", "7Rnd_45ACP_1911", "6Rnd_45ACP", "15Rnd_W1866_Slug", "8Rnd_B_Beneli_74Slug", "HandRoadFlare"}, {1, 0.8, 0.3, 0.3, 0.5, 0.3}};
+ military[] = {{"TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", "ItemBandage", "ItemPainkiller", "ItemMorphine", "30Rnd_556x45_Stanag", "17Rnd_9x19_glock17", "15Rnd_9x19_M9", "30Rnd_762x39_AK47", "30Rnd_545x39_AK", "8Rnd_B_Beneli_74Slug", "1Rnd_HE_M203", "FlareWhite_M203", "FlareGreen_M203", "1Rnd_Smoke_M203", "HandGrenade_west", "SmokeShell", "SmokeShellRed", "SmokeShellGreen", "8Rnd_B_Beneli_Pellets", "30Rnd_9x19_MP5", "HandChemGreen", "HandChemBlue", "HandChemRed", "ItemHeatPack","30Rnd_762x39_SA58","20Rnd_762x51_B_SCAR","64Rnd_9x19_SD_Bizon", "15Rnd_9x19_LUGER", "9Rnd_9x19_LUGER", "30Rnd_56x45_GP90", "20Rnd_762x55_SWISS_P_AP"}, {0.18, 0.09, 0.01, 0.01, 0.04, 0.04, 0.01, 0.04, 0.05, 0.02, 0.04, 0.04, 0.04, 0.01, 0.01, 0.01, 0.01, 0.01, 0.04, 0.02, 0.02, 0.04, 0.02, 0.02, 0.02, 0.02, 0.04, 0.04, 0.01, 0.01, 0.02, 0.04, 0.04, 0.01}};
+ policeman[] = {{"ItemBandage", "7Rnd_45ACP_1911", "6Rnd_45ACP", "15Rnd_W1866_Slug", "8Rnd_B_Beneli_74Slug", "HandRoadFlare", "15Rnd_9x19_LUGER", "9Rnd_9x19_LUGER"}, {1, 0.8, 0.3, 0.3, 0.5, 0.3, 0.06, 0.1}};
//hunter[] = {{"ItemBandage", "5x_22_LR_17_HMR", "7Rnd_45ACP_1911", "10x_303", "ItemWaterbottleUnfilled", "WoodenArrow", "ItemHeatPack"}, {1, 0.5, 0.2, 0.5, 0.2, 1, 0.2}};
hunter[] = {{"ItemBandage", "7Rnd_45ACP_1911", "10x_303_RX", "ItemWaterbottleUnfilled", "WoodenArrow", "ItemHeatPack"}, {1, 0.2, 0.5, 0.2, 1, 0.2}};
bloodbags[] = {{"ItemBloodbag", "HandRoadFlare", "HandChemGreen", "HandChemBlue", "HandChemRed"}, {0.5, 0.12, 0.12, 0.12, 0.12}};
diff --git a/@DayZRedux/Addons/dayz_code/CfgVehicles.hpp b/@DayZRedux/Addons/dayz_code/CfgVehicles.hpp
index b1d4f48..b804a52 100644
--- a/@DayZRedux/Addons/dayz_code/CfgVehicles.hpp
+++ b/@DayZRedux/Addons/dayz_code/CfgVehicles.hpp
@@ -28,7 +28,7 @@ class CfgVehicles {
class Eventhandlers {
init = "_this call zombie_initialize;";
- local = "if(_this select 1) then {[(position (_this select 0)),(_this select 0),true] execFSM '\z\AddOns\dayz_code\system\zombie_agent.fsm'};";
+ local = "if (_this select 1) then {[(position (_this select 0)),(_this select 0),true] execFSM '\z\AddOns\dayz_code\system\zombie_agent.fsm'};";
};
class HitPoints {
@@ -4933,7 +4933,7 @@ class CfgVehicles {
model="\dayz_equip\models\crowbar.p3d";
class eventHandlers
{
- init="[(_this select 0),'cfgWeapons','ItemCrowbar'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
+ init= "[(_this select 0),'cfgWeapons','ItemCrowbar'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
};
};
class WeaponHolder_ItemMachete: WeaponHolderBase
@@ -4943,7 +4943,7 @@ class CfgVehicles {
model="\z\addons\dayz_communityassets\models\machete.p3d";
class eventHandlers
{
- init="[(_this select 0),'cfgWeapons','ItemMachete'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
+ init= "[(_this select 0),'cfgWeapons','ItemMachete'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
};
};
};
diff --git a/@DayZRedux/Addons/dayz_code/RscTitles.hpp b/@DayZRedux/Addons/dayz_code/RscTitles.hpp
index e656bc0..0d98913 100644
--- a/@DayZRedux/Addons/dayz_code/RscTitles.hpp
+++ b/@DayZRedux/Addons/dayz_code/RscTitles.hpp
@@ -289,7 +289,7 @@ class RscDisplayMain : RscStandardDisplay {
class DAYZ_Version : CA_Version {
idc = -1;
- text = "DayZ Redux 1.1.3";
+ text = "DayZ Redux 1.2.1";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu; // External class reference
@@ -328,7 +328,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
- text = "DayZ Redux 1.1.3";
+ text = "DayZ Redux 1.2.1";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
delete CA_TitleMainMenu;
diff --git a/@DayZRedux/Addons/dayz_code/actions/ammo.sqf b/@DayZRedux/Addons/dayz_code/actions/ammo.sqf
index 9622faa..2b6172b 100644
--- a/@DayZRedux/Addons/dayz_code/actions/ammo.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/ammo.sqf
@@ -1,5 +1,5 @@
// This is not called in any way, shape, or form it is simply here for future reference
-private["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array"];
+private ["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array"];
_array = _this select 3;
_vehicle = _array select 0;
_weapon = _array select 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/boil.sqf b/@DayZRedux/Addons/dayz_code/actions/boil.sqf
index b3e05de..6fcfcbc 100644
--- a/@DayZRedux/Addons/dayz_code/actions/boil.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/boil.sqf
@@ -1,4 +1,4 @@
-private["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_dis","_sfx"];
+private ["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_dis","_sfx"];
player removeAction s_player_boil;
s_player_boil = -1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/box_ignite.sqf b/@DayZRedux/Addons/dayz_code/actions/box_ignite.sqf
index c707625..fabd55a 100644
--- a/@DayZRedux/Addons/dayz_code/actions/box_ignite.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/box_ignite.sqf
@@ -1,4 +1,4 @@
-private["_ent"];
+private ["_ent"];
_ent = _this select 3;
canAbortForce = true;
diff --git a/@DayZRedux/Addons/dayz_code/actions/box_place.sqf b/@DayZRedux/Addons/dayz_code/actions/box_place.sqf
index f184a92..0943e28 100644
--- a/@DayZRedux/Addons/dayz_code/actions/box_place.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/box_place.sqf
@@ -1,4 +1,4 @@
-private["_position","_box","_location","_isOk","_backpack","_tentType","_trg","_key"];
+private ["_position","_box","_location","_isOk","_backpack","_tentType","_trg","_key"];
if (vehicle player != player) exitWith {cutText ["You may not place a box while in a vehicle", "PLAIN DOWN"]};//check if player can build
@@ -58,7 +58,7 @@ if (_notInBuilding) then {
_box setVariable ["characterID",dayz_characterID,true];
dayzPublishObj = [dayz_characterID,_box,[_dir,_location],"Land_Mag_RX"];
- publicVariable "dayzPublishObj";
+ publicVariableServer "dayzPublishObj";
/* if (isServer) then {
dayzPublishObj call server_publishObj;
};
diff --git a/@DayZRedux/Addons/dayz_code/actions/box_retrieve.sqf b/@DayZRedux/Addons/dayz_code/actions/box_retrieve.sqf
index 1bf3456..22fd24a 100644
--- a/@DayZRedux/Addons/dayz_code/actions/box_retrieve.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/box_retrieve.sqf
@@ -1,3 +1,3 @@
-private["_obj","_bag","_pos"];
+private ["_obj","_bag","_pos"];
_obj = _this select 3;
_obj spawn player_retrieveBox;
diff --git a/@DayZRedux/Addons/dayz_code/actions/build.sqf b/@DayZRedux/Addons/dayz_code/actions/build.sqf
index bdd39db..16449a1 100644
--- a/@DayZRedux/Addons/dayz_code/actions/build.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/build.sqf
@@ -1,11 +1,11 @@
-private["_location","_isOk","_dir","_classname","_item"];
+private ["_location","_isOk","_dir","_classname","_item"];
_location = player modeltoworld [0,1,0];
_location set [2,0];
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
-if(_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
-if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
+if (_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
+if (_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
if (vehicle player != player) exitWith {cutText ["You may not build while in a vehicle", "PLAIN DOWN"]};
@@ -39,7 +39,7 @@ cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
//["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
-publicVariable "dayzPublishObj";
+publicVariableServer "dayzPublishObj";
sleep 2;
player allowDamage true;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/actions/cancel_ignite.sqf b/@DayZRedux/Addons/dayz_code/actions/cancel_ignite.sqf
index 32bb0b5..a965d40 100644
--- a/@DayZRedux/Addons/dayz_code/actions/cancel_ignite.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/cancel_ignite.sqf
@@ -1,4 +1,4 @@
-private["_isTent","_isStorageBox"];
+private ["_isTent","_isStorageBox"];
_isTent = ((cursorTarget isKindOf "Land_Cont_RX") or (cursorTarget isKindOf "Land_Cont2_RX"));
_isStorageBox = cursorTarget isKindOf "Land_Mag_RX";
diff --git a/@DayZRedux/Addons/dayz_code/actions/chloroform.sqf b/@DayZRedux/Addons/dayz_code/actions/chloroform.sqf
index 64981e0..89b2c43 100644
--- a/@DayZRedux/Addons/dayz_code/actions/chloroform.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/chloroform.sqf
@@ -1,4 +1,4 @@
-private["_hasChloroform","_item","_text","_body","_name"];
+private ["_hasChloroform","_item","_text","_body","_name"];
_body = _this select 3;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/confirm_ignite.sqf b/@DayZRedux/Addons/dayz_code/actions/confirm_ignite.sqf
index 5d760d2..140994c 100644
--- a/@DayZRedux/Addons/dayz_code/actions/confirm_ignite.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/confirm_ignite.sqf
@@ -1,4 +1,4 @@
-private["_isTent","_isStorageBox"];
+private ["_isTent","_isStorageBox"];
_isTent = (cursorTarget isKindOf "Land_Cont_RX") or (cursorTarget isKindOf "Land_Cont2_RX");
_isStorageBox = cursorTarget isKindOf "Land_Mag_RX";
diff --git a/@DayZRedux/Addons/dayz_code/actions/cook.sqf b/@DayZRedux/Addons/dayz_code/actions/cook.sqf
index 1c146ce..25948bd 100644
--- a/@DayZRedux/Addons/dayz_code/actions/cook.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/cook.sqf
@@ -1,4 +1,4 @@
-private["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"];
+private ["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"];
diag_log ("Cook Enabled");
player removeAction s_player_cook;
diff --git a/@DayZRedux/Addons/dayz_code/actions/dig_grave.sqf b/@DayZRedux/Addons/dayz_code/actions/dig_grave.sqf
new file mode 100644
index 0000000..11659d9
--- /dev/null
+++ b/@DayZRedux/Addons/dayz_code/actions/dig_grave.sqf
@@ -0,0 +1,55 @@
+private ["_notInBuilding","_isWater","_isGoodSurface","_animState","_isDoing","_canDo","_distanceFrom","_location","_building","_isMan","_isAlive","_inVehicle","_type","_minDistance","_dir","_dis","_sfx","_body","_bodyPos","_bodyHeight","_bodyATL"];
+
+_notInBuilding = false;
+_isGoodSurface = true;
+_building = nearestObject [cursorTarget, "HouseBase"];
+_type = typeOf _building;
+ if (_type != "Fort_EnvelopeSmall") then {
+ _minDistance = (sizeOf _type) + 1;
+ } else {
+ _minDistance = 0;
+ };
+_location = position cursorTarget;
+_distanceFrom = _location distance _building;
+_isMan = cursorTarget isKindOf "Man";
+_isAlive = alive cursorTarget;
+_inVehicle = (vehicle player != player);
+_isWater = (surfaceIsWater (position cursorTarget)) or dayz_isSwimming;
+_bodyPos = getPosATL cursorTarget;
+_bodyHeight = _bodyPos select 2;
+_bodyATL = _bodyHeight >= -0.2;
+_canDo = (!r_drag_sqf and !r_player_unconscious);
+_animState = animationState player;
+_isDoing = ["medic",_animState] call fnc_inString;
+
+ if (_isDoing or diggingGrave) exitWith {cutText ["You cannot dig a grave while performing another action!","PLAIN DOWN"];};
+ diggingGrave = true;
+ if (!_canDo) exitWith {cutText ["You cannot dig a grave while dragging a body!","PLAIN DOWN"]; diggingGrave = false;};
+ if (!_bodyATL) exitWith {cutText ["You cannot dig a grave for a body that has already been burried!","PLAIN DOWN"]; diggingGrave = false;};
+ if (_distanceFrom > _minDistance) then { _notInBuilding = true; };
+ if (isOnRoad _bodyPos) exitWith {cutText ["You cannot dig a grave on a road!","PLAIN DOWN"]; diggingGrave = false;};
+ if ((["Concrete",dayz_surfaceType] call fnc_inString) or (["Tarmac",dayz_surfaceType] call fnc_inString) or (["Rock",dayz_surfaceType] call fnc_inString) or (["BetonNew",dayz_surfaceType] call fnc_inString) or (["Beton",dayz_surfaceType] call fnc_inString) or (["BetonIN",dayz_surfaceType] call fnc_inString) or (["Roadway",dayz_surfaceType] call fnc_inString) or (["Asfalt",dayz_surfaceType] call fnc_inString) or (["CubeRoad",dayz_surfaceType] call fnc_inString) or (["Sil_new",dayz_surfaceType] call fnc_inString) or (["Asfalt_New",dayz_surfaceType] call fnc_inString) or (["DlazbaIN",dayz_surfaceType] call fnc_inString) or (["Road",dayz_surfaceType] call fnc_inString) or (["CRConcrete",dayz_surfaceType] call fnc_inString)) then { _isGoodSurface = false };
+ if (_isWater) exitWith {cutText ["You cannot dig a grave in water","PLAIN DOWN"]; diggingGrave = false;};
+ if (!_notInBuilding) exitWith {cutText ["You cannot dig a grave so close to a building!","PLAIN DOWN"]; diggingGrave = false;};
+ if (!_isGoodSurface) exitWith {cutText ["You cannot dig a grave on this terrain!","PLAIN DOWN"]; diggingGrave = false;};
+
+if (_isMan and !_isAlive and !_inVehicle) then {
+ _dir = round(direction cursorTarget);
+ player playActionNow "Medic";
+ sleep 1;
+ _dis=15;
+ _sfx = "repair";
+ [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
+ [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
+ sleep 5;
+
+ _body = createVehicle ["Fort_EnvelopeSmall", _location, [], 0, "CAN_COLLIDE"];
+ _body setdir _dir;
+ _body setpos _location;
+ player reveal _body;
+ _location = getPosATL _body;
+ diggingGrave = false;
+} else {
+ cutText ["You cannot dig a grave right now!","PLAIN DOWN"];
+ diggingGrave = false;
+};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/actions/dog/follow.sqf b/@DayZRedux/Addons/dayz_code/actions/dog/follow.sqf
index 6afdc6f..0bc043b 100644
--- a/@DayZRedux/Addons/dayz_code/actions/dog/follow.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/dog/follow.sqf
@@ -3,7 +3,7 @@ _handle = _array select 0;
_whistle = _array select 1;
_dog = _handle getFSMVariable "_dog";
-if(_whistle) then {
+if (_whistle) then {
[nil,player,rSAY,["dog_callBack", 120]] call RE;
};
diff --git a/@DayZRedux/Addons/dayz_code/actions/dog/speed.sqf b/@DayZRedux/Addons/dayz_code/actions/dog/speed.sqf
index 66276c1..9320ee3 100644
--- a/@DayZRedux/Addons/dayz_code/actions/dog/speed.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/dog/speed.sqf
@@ -8,7 +8,7 @@ s_player_speeddog = -1;
_dog = _handle getFSMVariable "_dog";
-if(player distance _dog > 5) then {
+if (player distance _dog > 5) then {
[nil,player,rSAY,["dog_slowDown", 120]] call RE;
};
diff --git a/@DayZRedux/Addons/dayz_code/actions/fire_light.sqf b/@DayZRedux/Addons/dayz_code/actions/fire_light.sqf
index bb62a77..fd9f237 100644
--- a/@DayZRedux/Addons/dayz_code/actions/fire_light.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/fire_light.sqf
@@ -1,4 +1,4 @@
-private["_location","_isOk","_dir","_classname"];
+private ["_location","_isOk","_dir","_classname"];
_location = player modeltoworld [0,1,0];
_location set [2,0];
_isOk = count (_location isFlatEmpty [0.5,0,0,4,0,false,player]) > 0;
diff --git a/@DayZRedux/Addons/dayz_code/actions/fire_pack.sqf b/@DayZRedux/Addons/dayz_code/actions/fire_pack.sqf
index fb6a5e0..88d56c4 100644
--- a/@DayZRedux/Addons/dayz_code/actions/fire_pack.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/fire_pack.sqf
@@ -1,8 +1,8 @@
-private["_obj"];
+private ["_obj"];
_obj = _this select 3;
player playActionNow "Medic";
sleep 6;
-if(_obj isKindOf "Land_fire") then {
+if (_obj isKindOf "Land_fire") then {
dayz_hasFire = objNull;
deleteVehicle _obj;
};
diff --git a/@DayZRedux/Addons/dayz_code/actions/flare_drop.sqf b/@DayZRedux/Addons/dayz_code/actions/flare_drop.sqf
index 9d217f0..73c12c0 100644
--- a/@DayZRedux/Addons/dayz_code/actions/flare_drop.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/flare_drop.sqf
@@ -1,4 +1,4 @@
-private["_flare"];
+private ["_flare"];
_flare = _this select 3;
player removeAction s_player_dropflare;
detach _flare;
diff --git a/@DayZRedux/Addons/dayz_code/actions/flare_pickup.sqf b/@DayZRedux/Addons/dayz_code/actions/flare_pickup.sqf
index 421c432..442bbda 100644
--- a/@DayZRedux/Addons/dayz_code/actions/flare_pickup.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/flare_pickup.sqf
@@ -1,4 +1,4 @@
-private["_flare"];
+private ["_flare"];
_flare = _this select 3;
player playActionNow "PutDown";
sleep 2;
diff --git a/@DayZRedux/Addons/dayz_code/actions/flare_remove.sqf b/@DayZRedux/Addons/dayz_code/actions/flare_remove.sqf
index ab11367..7091794 100644
--- a/@DayZRedux/Addons/dayz_code/actions/flare_remove.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/flare_remove.sqf
@@ -1,4 +1,4 @@
-private["_flare"];
+private ["_flare"];
_flare = _this select 3;
deleteVehicle _flare;
player removeAction s_player_grabflare;
diff --git a/@DayZRedux/Addons/dayz_code/actions/flip_vehicle.sqf b/@DayZRedux/Addons/dayz_code/actions/flip_vehicle.sqf
index 4fd98cd..fb8e580 100644
--- a/@DayZRedux/Addons/dayz_code/actions/flip_vehicle.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/flip_vehicle.sqf
@@ -1,4 +1,4 @@
-private["_obj","_bag","_pos"];
+private ["_obj","_bag","_pos"];
_veh = _this select 3;
player playActionNow "Medic";
diff --git a/@DayZRedux/Addons/dayz_code/actions/forcesave.sqf b/@DayZRedux/Addons/dayz_code/actions/forcesave.sqf
index 79c2857..df4e920 100644
--- a/@DayZRedux/Addons/dayz_code/actions/forcesave.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/forcesave.sqf
@@ -1,4 +1,4 @@
-private["_object"];
+private ["_object"];
//["dayzUpdateVehicle",[_this select 3,"all"]] call callRpcProcedure;
dayzUpdateVehicle = [_this select 3,"all"];
diff --git a/@DayZRedux/Addons/dayz_code/actions/gather_meat.sqf b/@DayZRedux/Addons/dayz_code/actions/gather_meat.sqf
index d18d5ad..609c8df 100644
--- a/@DayZRedux/Addons/dayz_code/actions/gather_meat.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/gather_meat.sqf
@@ -1,4 +1,4 @@
-private["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_string","_type"];
+private ["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_string","_type"];
_item = _this select 3;
_hasKnife = "ItemKnife" in items player;
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
diff --git a/@DayZRedux/Addons/dayz_code/actions/hide_body.sqf b/@DayZRedux/Addons/dayz_code/actions/hide_body.sqf
new file mode 100644
index 0000000..2bb4e58
--- /dev/null
+++ b/@DayZRedux/Addons/dayz_code/actions/hide_body.sqf
@@ -0,0 +1,69 @@
+private ["_body","_isMan","_isAlive","_inVehicle","_animState","_isDoing","_grave","_canDo","_isZombie","_cross","_dir","_location","_sfx","_dis","_isAnimal","_bodyPos","_bodyHeight","_bodyATL","_pos","_flies"];
+
+_body = cursorTarget;
+_isMan = cursorTarget isKindOf "Man";
+_isAlive = alive cursorTarget;
+_inVehicle = (vehicle player != player);
+_grave = nearestObject [cursorTarget,"Fort_EnvelopeSmall"];
+_isZombie = cursorTarget isKindOf "zZambie_Base";
+_location = position _grave;
+_dir = round(direction _grave);
+_isAnimal = cursorTarget isKindOf "Animal";
+_bodyPos = getPosATL cursorTarget;
+_bodyHeight = _bodyPos select 2;
+_bodyATL = _bodyHeight >= -0.2;
+_canDo = (!r_drag_sqf and !r_player_unconscious);
+_animState = animationState player;
+_isDoing = ["medic",_animState] call fnc_inString;
+
+ if (_isDoing) exitWith {cutText ["You cannot bury a body while performing another action!","PLAIN DOWN"];};
+ if (!_canDo) exitWith {cutText ["You cannot dig a grave while dragging a body!","PLAIN DOWN"];};
+ if (!_bodyATL) exitWith {cutText ["This body has already been hidden!","PLAIN DOWN"];};
+
+ //For animals
+ if (_isAnimal and !_inVehicle and !_isMan and !_isZombie) then {
+ player playActionNow "Medic";
+ sleep 2;
+ dayzHideBody = _body;
+ hideBody _body;
+ publicVariable "dayzHideBody";
+ sleep 2;
+ deleteVehicle _body;
+ };
+
+ //Zeds and players
+ if ((_isMan or _isZombie) and !_isAlive and !_inVehicle) then {
+
+ player playActionNow "Medic";
+ sleep 1;
+ _dis=10;
+ _sfx = "repair";
+ [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
+ [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
+ sleep 3;
+ dayzHideBody = _body;
+ hideBody _body;
+ publicVariable "dayzHideBody";
+ sleep 2;
+ deleteVehicle _grave;
+
+ //Create cross at grave site for burried players
+ if (_isMan and !_isZombie and !_isAnimal) then {
+ _cross = createVehicle ["GraveCrossHelmet_EP1", _location, [], 0, "CAN_COLLIDE"];
+ _cross setdir _dir;
+ _cross setpos _location;
+
+ //Delete flies
+ _pos = getPosATL _body;
+ _flies = nearestObject [_pos,"Sound_Flies"];
+ if (!(isNull _flies)) then {
+ deleteVehicle _flies;
+ };
+ player reveal _cross;
+ };
+
+ sleep 2;
+ deleteVehicle _body;
+ } else {
+ cutText ["You cannot bury a player while in a vehicle!","PLAIN DOWN"];
+ };
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/actions/inspectvehicle.sqf b/@DayZRedux/Addons/dayz_code/actions/inspectvehicle.sqf
index 75e45fc..b077775 100644
--- a/@DayZRedux/Addons/dayz_code/actions/inspectvehicle.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/inspectvehicle.sqf
@@ -1,4 +1,4 @@
-private["_vehicle","_part","_hitpoint","_type","_selection","_array"];
+private ["_vehicle","_part","_hitpoint","_type","_selection","_array"];
disableSerialization;
_array = _this select 3;
@@ -53,15 +53,15 @@ _repairText = "";
_humanPartNameString = toString _humanPartName;
- if(["HRotor",_x,false] call fnc_inString) then {
+ if (["HRotor",_x,false] call fnc_inString) then {
_humanPartNameString = "Main Rotor Assembly";
};
- if(["VRotor",_x,false] call fnc_inString) then {
+ if (["VRotor",_x,false] call fnc_inString) then {
_humanPartNameString = "Rear Rotor Assembly";
};
- if(["Wheel",_x,false] call fnc_inString) then {
+ if (["Wheel",_x,false] call fnc_inString) then {
_partNoWheel = [];
for "_i" from 0 to ((count _humanPartName) - 6) do {_partNoWheel set [count _partNoWheel,(_humanPartName select _i)]};
_partNoWheelString = toString _partNoWheel;
diff --git a/@DayZRedux/Addons/dayz_code/actions/jerry_fill.sqf b/@DayZRedux/Addons/dayz_code/actions/jerry_fill.sqf
index 15e2ac2..41209ea 100644
--- a/@DayZRedux/Addons/dayz_code/actions/jerry_fill.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/jerry_fill.sqf
@@ -1,4 +1,4 @@
-private["_hasFood","_item","_text","_qty"];
+private ["_hasFood","_item","_text","_qty"];
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/object_gear.sqf b/@DayZRedux/Addons/dayz_code/actions/object_gear.sqf
index 76b9969..22ed7ea 100644
--- a/@DayZRedux/Addons/dayz_code/actions/object_gear.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/object_gear.sqf
@@ -1,4 +1,4 @@
-private["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text"];
+private ["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text"];
_holder = _this select 3;
player action ["Gear", _holder];
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/actions/object_pickup.sqf b/@DayZRedux/Addons/dayz_code/actions/object_pickup.sqf
index 6f9a4e3..b6a8972 100644
--- a/@DayZRedux/Addons/dayz_code/actions/object_pickup.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/object_pickup.sqf
@@ -1,85 +1,72 @@
-private["_array","_type","_classname","_holder","_playerID","_text","_broken","_claimedBy","_config","_isOk"];
+private ["_array","_type","_classname","_holder","_playerID","_text","_broken","_claimedBy","_config","_isOk","_wpn","_ismelee"];
_array = _this select 3;
_type = _array select 0;
_classname = _array select 1;
_holder = _array select 2;
+if (player distance _holder > 3) exitwith {"You need to be within 3 meters to pickup!","PLAIN DOWN"};
+
_playerID = getPlayerUID player;
+
+if (!isNil "s_player_holderPickup") then {
+ player removeAction s_player_holderPickup;
+};
+
_text = getText (configFile >> _type >> _classname >> "displayName");
-if (!canPickup) exitwith { cutText ["You may only pick up one item at a time!","PLAIN DOWN"] };
+if (!canPickup) exitwith {
+ if (pickupInit) then {
+ cutText ["[ANTI-DUPE] You must wait to pickup this item!","PLAIN DOWN"]
+ } else {
+ cutText ["[ANTI-DUPE] You may only pickup one item at a time!","PLAIN DOWN"]
+ };
+};
_claimedBy = _holder getVariable "claimed";
-if (isnil "claimed") then {
+if (isnil "claimed") then {
_holder setVariable["claimed",_playerID,true];
};
+canPickup = false;
-if(_classname isKindOf "TrapBear") exitwith {deleteVehicle _holder;};
+if (_classname isKindOf "TrapBear") exitwith {deleteVehicle _holder;};
player playActionNow "PutDown";
//Adding random chance of arrow is re-usable on pickup
_broken = false;
-if(_classname == "WoodenArrow") then {
+if (_classname == "WoodenArrow") then {
if (20 > random 100) then {
_broken = true;
};
};
-if (_broken) exitWith { deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"] };
+if (_broken) exitWith { deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"]; };
-sleep 0.25; //Why are we waiting? Animation
+//sleep 0.25; //Why are we waiting? Animation
_claimedBy = _holder getVariable["claimed","0"];
-if (_claimedBy != _playerID) exitWith {cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
+if (_claimedBy != _playerID) exitWith {cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]; };
-if(_classname isKindOf "Bag_Base_EP1") then {
+if (_classname isKindOf "Bag_Base_EP1") then {
diag_log("Picked up a bag: " + _classname);
};
_config = (configFile >> _type >> _classname);
-//Remove melee magazines (BIS_fnc_invAdd fix)
{player removeMagazines _x} forEach MeleeMagazines;
-_freeSlots = [player] call BIS_fnc_invSlotsEmpty;
-_slotType = [_config] call BIS_fnc_invSlotType;
-
-_count = 0;
- {
- if (_x > 0) exitWith {};
- _count = _count + 1;
- } forEach _slotType;
-
-if (_freeSlots select _count >= _slotType select _count) then
-{
- if (_type == "cfgWeapons") then { player addWeapon _classname; } else { player addMagazine _classname; };
- deleteVehicle _holder;
- canPickup = false;
-
-} else {
-
- _holder setVariable["claimed",0,true];
- cutText [localize "str_player_24", "PLAIN DOWN"];
- canPickup = false;
-};
-
-diag_log format["Array: %1, Type: %2, Classname: %3, Holder: %4, SlotNeeded: %5, Freeslots: %6",_array,_type,_classname,_holder,_slotType,_freeSlots];
-
-/*
-//_isOk = [player,_config] call BIS_fnc_invAdd;
-waitUntil {_isOk};
+_isOk = [player,_config] call BIS_fnc_invAdd;
+waitUntil {!isNil "_isOk"};
if (_isOk) then {
deleteVehicle _holder;
- canPickup = false;
} else {
- _holder setVariable["claimed",0,true];
- cutText [localize "str_player_24", "PLAIN DOWN"];
- canPickup = false;
+ if (!_isOk) exitWith {
+ _holder setVariable["claimed",0,true];
+ cutText [localize "str_player_24", "PLAIN DOWN"];
+ };
};
-*/
sleep 3;
diff --git a/@DayZRedux/Addons/dayz_code/actions/object_takeBag.sqf b/@DayZRedux/Addons/dayz_code/actions/object_takeBag.sqf
index 5ff5bb2..93ab0e2 100644
--- a/@DayZRedux/Addons/dayz_code/actions/object_takeBag.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/object_takeBag.sqf
@@ -1,4 +1,4 @@
-private["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text"];
+private ["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text"];
_holder = _this select 3;
_classname = typeOf _holder;
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_addToolbelt.sqf b/@DayZRedux/Addons/dayz_code/actions/player_addToolbelt.sqf
index d77189a..a38898d 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_addToolbelt.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_addToolbelt.sqf
@@ -1,4 +1,4 @@
-private["_item","_config","_onLadder","_create","_isOk","_config2","_consume"];
+private ["_item","_config","_onLadder","_create","_isOk","_config2","_consume"];
_item = _this;
_config = configFile >> "cfgWeapons" >> _item;
@@ -38,7 +38,7 @@ _isOk = [player,_config2] call BIS_fnc_invAdd;
if (_isOk) then {
//Remove item
player removeWeapon _item;
-
+
//Add magazines if needed
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_create == "MeleeCrowbar") then {
@@ -50,19 +50,10 @@ if (_isOk) then {
if (_create == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
- if (_type == "cfgWeapons") then {
- _muzzles = getArray(configFile >> "cfgWeapons" >> _create >> "muzzles");
- _wtype = ((weapons player) select 0);
- if (count _muzzles > 1) then {
- player selectWeapon (_muzzles select 0);
- } else {
- player selectWeapon _wtype;
- };
- };
- };
+ };
} else {
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
-
+
//Add magazines back
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_item == "MeleeCrowbar") then {
@@ -74,5 +65,5 @@ if (_isOk) then {
if (_item == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
- };
+ };
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_build.sqf b/@DayZRedux/Addons/dayz_code/actions/player_build.sqf
index 5460baf..c16437e 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_build.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_build.sqf
@@ -1,14 +1,15 @@
-private["_location","_isOk","_dir","_classname","_item","_restrictBuild","_inBuilding","_hasbuildmag","_requireItem","_buildError","_toolName"];
+private ["_location","_isOk","_dir","_classname","_item","_restrictBuild","_inBuilding","_hasbuildmag","_requireItem","_buildError","_toolName"];
_location = player modeltoworld [0,1,0];
_location set [2,0];
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
_bypass = false;
+_buildError = false;
call gear_ui_init;
-if(_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
-if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
+if (_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
+if (_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
_item = _this;
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
@@ -24,12 +25,12 @@ if (!_hasbuildmag) exitWith {cutText [format[(localize "str_player_31"),_text,"b
{
_hasTool = _x in items player;
_toolName = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
- if (!_hasTool) exitWith{
+ if (!_hasTool) exitWith {
_buildError = true;
};
} forEach _requireItems;
-if (_buildError) exitWith{
+if (_buildError) exitWith {
cutText [format["You must have a %1 to build %2.", _toolName,_text], "PLAIN DOWN"];
};
@@ -74,7 +75,7 @@ if (!_restrictBuild || _bypass || (_restrictBuild && !_inBuilding)) then {
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
- publicVariable "dayzPublishObj";
+ publicVariableServer "dayzPublishObj";
sleep 2;
player allowDamage true;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_chopWood.sqf b/@DayZRedux/Addons/dayz_code/actions/player_chopWood.sqf
index 7bebb0a..f189159 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_chopWood.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_chopWood.sqf
@@ -1,5 +1,5 @@
-private["_location","_isOk","_dir","_classname"];
-private["_item"];
+private ["_location","_isOk","_dir","_classname"];
+private ["_item"];
_item = _this;
call gear_ui_init;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_constructItem.sqf b/@DayZRedux/Addons/dayz_code/actions/player_constructItem.sqf
index 5bd2611..06388e1 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_constructItem.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_constructItem.sqf
@@ -1,4 +1,4 @@
-private["_item","_buildError","_toolName","_itemName","_requiredName","_requiredCount"];
+private ["_item","_buildError","_toolName","_itemName","_requiredName","_requiredCount"];
disableSerialization;
_item = _this;
_config = configFile >> "CfgMagazines" >> _item;
@@ -11,12 +11,12 @@ _create = getArray (_config >> "ItemActions" >> "Construct" >> "output");
{
_hasTool = _x in items player;
_toolName = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
- if (!_hasTool) exitWith{
+ if (!_hasTool) exitWith {
_buildError = true;
};
} forEach _tools;
-if (_buildError) exitWith{
+if (_buildError) exitWith {
cutText [format["You must have a %1 to perform this construction.", _toolName], "PLAIN DOWN"];
};
@@ -28,12 +28,12 @@ if (_buildError) exitWith{
_playerCount = {_x == _requiredName} count magazines player;
_itemName = getText(configFile >> "CfgMagazines" >> _requiredName >> "displayName");
- if (_playerCount < _requiredCount) exitWith{
+ if (_playerCount < _requiredCount) exitWith {
_buildError = true;
};
} forEach _consume;
-if (_buildError) exitWith{
+if (_buildError) exitWith {
cutText [format["You do not have %1 %2, which is needed for this construction.", _requiredCount, _itemName], "PLAIN DOWN"];
};
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_convertBloodBag.sqf b/@DayZRedux/Addons/dayz_code/actions/player_convertBloodBag.sqf
index 19f4eb0..bd1ca18 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_convertBloodBag.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_convertBloodBag.sqf
@@ -1,4 +1,4 @@
-private["_hasBag","_item","_text","_key","_inBuilding","_isHospital","_giveBag"];
+private ["_hasBag","_item","_text","_key","_inBuilding","_isHospital","_giveBag"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_drink.sqf b/@DayZRedux/Addons/dayz_code/actions/player_drink.sqf
index 94f0004..f3ce9f4 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_drink.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_drink.sqf
@@ -1,4 +1,4 @@
-private["_onLadder","_itemorignal","_invehicle","_hasdrinkitem","_hasoutput","_config","_text","_sfx","_dis","_id","_itemtodrop","_nearByPile","_item","_display"];
+private ["_onLadder","_itemorignal","_invehicle","_hasdrinkitem","_hasoutput","_config","_text","_sfx","_dis","_id","_itemtodrop","_nearByPile","_item","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_dropWeapon.sqf b/@DayZRedux/Addons/dayz_code/actions/player_dropWeapon.sqf
index d4fdf46..44bb7d9 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_dropWeapon.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_dropWeapon.sqf
@@ -1,6 +1,8 @@
-private["_item"];
+private["_item","_config","_onLadder","_consume","_meleeNum","_bag","_i"];
+
_item = _this;
_config = configFile >> "CfgWeapons" >> _item;
+_droppedtype = (gettext (_config >> "droppeditem"));
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
@@ -8,16 +10,19 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
call gear_ui_init;
_consume = ([] + getArray (_config >> "magazines")) select 0;
-
-_meleeNum = ({_x == _consume} count magazines player);
-for "_i" from 1 to _meleeNum do {
- player removeMagazine _consume;
-};
+player removeMagazines _consume;
player removeWeapon _item;
+
+if (_droppedtype == "") then { _item = _this; } else { _item = _droppedtype; };
+
+/*
if (_item == "MeleeHatchet") then {_item = "ItemHatchet";};
if (_item == "MeleeCrowbar") then {_item = "ItemCrowbar";};
if (_item == "MeleeMachete") then {_item = "ItemMachete";};
-_bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 0, "CAN_COLLIDE"];
+*/
+
+_bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 1, "CAN_COLLIDE"];
+_bag modelToWorld getPosATL player;
_bag setdir (getDir player);
-player reveal _bag;
\ No newline at end of file
+player reveal _bag;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_eat.sqf b/@DayZRedux/Addons/dayz_code/actions/player_eat.sqf
index 86e71e8..d088662 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_eat.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_eat.sqf
@@ -1,4 +1,4 @@
-private["_onLadder","_invehicle","_itemorignal","_hasfooditem","_rawfood","_cookedfood","_hasoutput","_config","_text","_regen","_dis","_sfx","_Cookedtime","_itemtodrop","_nearByPile","_item","_display"];
+private ["_onLadder","_invehicle","_itemorignal","_hasfooditem","_rawfood","_cookedfood","_hasoutput","_config","_text","_regen","_dis","_sfx","_Cookedtime","_itemtodrop","_nearByPile","_item","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_flipvehicle.sqf b/@DayZRedux/Addons/dayz_code/actions/player_flipvehicle.sqf
index 5d4c0db..760c413 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_flipvehicle.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_flipvehicle.sqf
@@ -1,4 +1,4 @@
-private["_object","_position"];
+private ["_object","_position"];
_object = _this select 3;
_position = [position _object,0,0,0,0,0,0,position player] call BIS_fnc_findSafePos;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_makefire.sqf b/@DayZRedux/Addons/dayz_code/actions/player_makefire.sqf
index e17f848..1b46ead 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_makefire.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_makefire.sqf
@@ -1,4 +1,4 @@
-private["_location","_isOk","_dir","_classname"];
+private ["_location","_isOk","_dir","_classname"];
_location = player modeltoworld [0,0.3,0];
if ((_location select 2) < 0) then {
_location set [2,0];
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_reloadMags.sqf b/@DayZRedux/Addons/dayz_code/actions/player_reloadMags.sqf
index aeb4c92..e0c594b 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_reloadMags.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_reloadMags.sqf
@@ -1,4 +1,4 @@
-private["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_i","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_avaliable_slots"];
+private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_i","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_avaliable_slots"];
disableSerialization;
call gear_ui_init;
@@ -83,9 +83,10 @@ if ( _consume_magsize > _create_magsize) then {
_qtynew_consume_ammo = 0;
};
-if ((_qtynew_create_mags + _qtynew_consume_mags) > _avaliable_slots) exitWith {
- cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
+if ((_qtynew_create_mags + _qtynew_consume_mags) > (_qty_create_mags + _qty_consume_mags + _qty_free_slots)) exitWith {
+ cutText [localize "str_player_24", "PLAIN DOWN"];
};
+
_qtynew_consume_mags_full = floor(_qtynew_consume_ammo/_consume_magsize);
_qtynew_create_mags_full = floor(_qtynew_create_ammo/_create_magsize);
_qtynew_consume_ammo_rest = _qtynew_consume_ammo - (_qtynew_consume_mags_full*_consume_magsize);
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_selfTransfuse.sqf b/@DayZRedux/Addons/dayz_code/actions/player_selfTransfuse.sqf
index 64ed414..d410da9 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_selfTransfuse.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_selfTransfuse.sqf
@@ -1,4 +1,4 @@
-private["_hasKit","_item","_text","_key"];
+private ["_hasKit","_item","_text","_key"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_setTrap.sqf b/@DayZRedux/Addons/dayz_code/actions/player_setTrap.sqf
index 00c75bb..3012b8c 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_setTrap.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_setTrap.sqf
@@ -1,4 +1,4 @@
-private["_item"];
+private ["_item"];
_item = _this;
_config = configFile >> "CfgWeapons" >> _item;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_useMeds.sqf b/@DayZRedux/Addons/dayz_code/actions/player_useMeds.sqf
index be70c04..39702ef 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_useMeds.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_useMeds.sqf
@@ -1,4 +1,4 @@
-private["_item"];
+private ["_item"];
_item = _this;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
diff --git a/@DayZRedux/Addons/dayz_code/actions/player_wearClothes.sqf b/@DayZRedux/Addons/dayz_code/actions/player_wearClothes.sqf
index 46be73f..8509caa 100644
--- a/@DayZRedux/Addons/dayz_code/actions/player_wearClothes.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/player_wearClothes.sqf
@@ -2,7 +2,7 @@
_item spawn player_wearClothes;
TODO: female
*/
-private["_item","_isFemale","_itemNew","_item","_onLadder","_model","_hasclothesitem","_config","_text"];
+private ["_item","_isFemale","_itemNew","_item","_onLadder","_model","_hasclothesitem","_config","_text"];
_item = _this;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
@@ -19,7 +19,7 @@ if (vehicle player != player) exitWith {cutText ["You may not change clothes whi
_isFemale = ((typeOf player == "SW2_RX")||(typeOf player == "BW1_RX"));
if (_isFemale) exitWith {cutText ["Currently Female Characters cannot change to this skin. This will change in a future update.", "PLAIN DOWN"]};
-private["_itemNew","_myModel","_humanity","_isBandit","_isHero"];
+private ["_itemNew","_myModel","_humanity","_isBandit","_isHero"];
_myModel = (typeOf player);
//diag_log("DIAG: wearClothes allowdamage false");
player allowDamage false;
diff --git a/@DayZRedux/Addons/dayz_code/actions/refuel.sqf b/@DayZRedux/Addons/dayz_code/actions/refuel.sqf
index 08b284a..fd3d5d8 100644
--- a/@DayZRedux/Addons/dayz_code/actions/refuel.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/refuel.sqf
@@ -1,4 +1,4 @@
-private["_vehicle","_curFuel","_newFuel","_timeLeft"];
+private ["_vehicle","_curFuel","_newFuel","_timeLeft"];
_vehicle = cursorTarget;
_canSize = getNumber(configFile >> "cfgMagazines" >> "ItemJerrycan" >> "fuelQuantity");
diff --git a/@DayZRedux/Addons/dayz_code/actions/remove.sqf b/@DayZRedux/Addons/dayz_code/actions/remove.sqf
index f6298c9..7251c25 100644
--- a/@DayZRedux/Addons/dayz_code/actions/remove.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/remove.sqf
@@ -2,7 +2,7 @@
delete object from db
parameters: _obj
*/
-private["_obj","_objectID","_objectUID"];
+private ["_obj","_objectID","_objectUID"];
_obj = _this select 3;
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
@@ -19,5 +19,5 @@ sleep 5;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
- publicVariable "dayzDeleteObj";
+ publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/actions/remove_parts.sqf b/@DayZRedux/Addons/dayz_code/actions/remove_parts.sqf
index b4c3cfb..6fbd3c4 100644
--- a/@DayZRedux/Addons/dayz_code/actions/remove_parts.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/remove_parts.sqf
@@ -1,6 +1,6 @@
// Remove Parts from Vehicles - By SilverShot.
-private["_vehicle","_part","_hitpoint","_type","_selection","_array"];
+private ["_vehicle","_otherPlayerNear","_part","_hitpoint","_type","_selection","_array"];
_id = _this select 2;
_array = _this select 3;
_vehicle = _array select 0;
@@ -9,6 +9,8 @@ _hitpoint = _array select 2;
_type = typeOf _vehicle;
_hasToolbox = "ItemToolbox" in items player;
+_otherPlayerNear = {isPlayer _x} count (_vehicle nearEntities ["CAManBase", 10]) > 1;
+if (_otherPlayerNear) exitWith {cutText [format["[Anti-Dupe] You must be the only player within 10 meters of the vehicle to remove parts."] , "PLAIN DOWN"]};
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
@@ -18,7 +20,7 @@ if (_hasToolbox) then {
_damage = [_vehicle,_hitpoint] call object_getHit;
- if( _damage < 0.20 ) then {
+ if ( _damage < 0.20 ) then {
_result = [player,_part] call BIS_fnc_invAdd;
if (_result) then {
@@ -27,15 +29,19 @@ if (_hasToolbox) then {
silver_myCursorTarget = objNull;
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
- if( _hitpoint == "HitEngine" or _hitpoint == "HitFuel" ) then {
- dayzSetFix = [_vehicle,_selection,0.89];
+ if ( _hitpoint == "HitEngine" or _hitpoint == "HitFuel" ) then {
+ if (_type isKindOf "Helicopter") then {
+ dayzSetFix = [_vehicle,_selection,0.94];
+ } else {
+ dayzSetFix = [_vehicle,_selection,0.89];
+ };
} else {
dayzSetFix = [_vehicle,_selection,1];
};
if (local _vehicle) then {
dayzSetFix call object_setFixServer;
- }else{
+ } else {
publicVariable "dayzSetFix";
};
@@ -61,7 +67,7 @@ if (_hasToolbox) then {
};
};
-if( silver_myCursorTarget != objNull ) then {
+if ( silver_myCursorTarget != objNull ) then {
{silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
s_player_removeActions = [];
silver_myCursorTarget = objNull;
diff --git a/@DayZRedux/Addons/dayz_code/actions/repair.sqf b/@DayZRedux/Addons/dayz_code/actions/repair.sqf
index 09e8e8f..478c8d6 100644
--- a/@DayZRedux/Addons/dayz_code/actions/repair.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/repair.sqf
@@ -1,4 +1,4 @@
-private["_vehicle","_part","_hitpoint","_type","_selection","_array"];
+private ["_vehicle","_part","_hitpoint","_type","_selection","_array"];
_id = _this select 2;
_array = _this select 3;
_vehicle = _array select 0;
diff --git a/@DayZRedux/Addons/dayz_code/actions/study_body.sqf b/@DayZRedux/Addons/dayz_code/actions/study_body.sqf
index 2c48042..360e2b1 100644
--- a/@DayZRedux/Addons/dayz_code/actions/study_body.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/study_body.sqf
@@ -1,4 +1,4 @@
-private["_body","_name","_method","_methodStr"];
+private ["_body","_name","_method","_methodStr"];
_body = _this select 3;
_name = _body getVariable["bodyName","unknown"];
_method = _body getVariable["deathType","unknown"];
diff --git a/@DayZRedux/Addons/dayz_code/actions/tame_dog.sqf b/@DayZRedux/Addons/dayz_code/actions/tame_dog.sqf
index e4c399a..a0662df 100644
--- a/@DayZRedux/Addons/dayz_code/actions/tame_dog.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/tame_dog.sqf
@@ -13,7 +13,7 @@
_dog = Intended target of the script.
*/
-private["_target", "_caller", "_id", "_dog", "_pos", "_fsmid"];
+private ["_target", "_caller", "_id", "_dog", "_pos", "_fsmid"];
_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/actions/tent_ignite.sqf b/@DayZRedux/Addons/dayz_code/actions/tent_ignite.sqf
index f78e2e5..41ae600 100644
--- a/@DayZRedux/Addons/dayz_code/actions/tent_ignite.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/tent_ignite.sqf
@@ -1,4 +1,4 @@
-private["_ent"];
+private ["_ent"];
_ent = _this select 3;
canAbortForce = true;
diff --git a/@DayZRedux/Addons/dayz_code/actions/tent_pack.sqf b/@DayZRedux/Addons/dayz_code/actions/tent_pack.sqf
index cb7ee89..a9cff0c 100644
--- a/@DayZRedux/Addons/dayz_code/actions/tent_pack.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/tent_pack.sqf
@@ -1,3 +1,3 @@
-private["_obj","_bag","_pos"];
+private ["_obj","_bag","_pos"];
_obj = _this select 3;
_obj spawn player_packTent;
diff --git a/@DayZRedux/Addons/dayz_code/actions/tent_pitch.sqf b/@DayZRedux/Addons/dayz_code/actions/tent_pitch.sqf
index 5cda79a..e68f608 100644
--- a/@DayZRedux/Addons/dayz_code/actions/tent_pitch.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/tent_pitch.sqf
@@ -1,4 +1,4 @@
-private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
+private ["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
//check if can pitch here
call gear_ui_init;
_item = _this;
@@ -45,7 +45,7 @@ if (_notInBuilding) then {
player playActionNow "Medic";
sleep 1;
- _dis=50;
+ _dis=15;
_sfx = "tentunpack";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
@@ -63,7 +63,7 @@ if (_notInBuilding) then {
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
dayzPublishObj = [dayz_characterID,_tent,[_dir,_location],"Land_Cont2_RX"];
- publicVariable "dayzPublishObj";
+ publicVariableServer "dayzPublishObj";
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
} else {
diff --git a/@DayZRedux/Addons/dayz_code/actions/water_fill.sqf b/@DayZRedux/Addons/dayz_code/actions/water_fill.sqf
index f892cb5..44d8fc5 100644
--- a/@DayZRedux/Addons/dayz_code/actions/water_fill.sqf
+++ b/@DayZRedux/Addons/dayz_code/actions/water_fill.sqf
@@ -1,4 +1,4 @@
-private["_hasFood","_item","_text","_qty"];
+private ["_hasFood","_item","_text","_qty"];
call gear_ui_init;
diff --git a/@DayZRedux/Addons/dayz_code/compile/building_spawnLoot.sqf b/@DayZRedux/Addons/dayz_code/compile/building_spawnLoot.sqf
index 8c73770..d963b9f 100644
--- a/@DayZRedux/Addons/dayz_code/compile/building_spawnLoot.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/building_spawnLoot.sqf
@@ -1,54 +1,41 @@
-private["_serial","_positions","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_allItems","_items","_itemType","_itemChance","_lootChance","_weights","_index"];
+private ["_obj", "_type", "_config", "_positions", "_itemChance", "_itemTypes", "_lootChance", "_countPositions", "_rnd", "_iPos", "_nearBy", "_index", "_weights", "_cntWeights", "_itemType"];
-_obj = _this select 0;
-_type = typeOf _obj;
-_config = configFile >> "CfgBuildingLoot" >> _type;
-_positions = [] + getArray (_config >> "lootPos");
-_lootChance = getNumber (_config >> "lootChance");
-_itemType = [] + getArray (_config >> "itemType");
+_obj = _this;
+_type = typeOf _obj;
+_config = configFile >> "CfgBuildingLoot" >> _type;
+_positions = [] + getArray (_config >> "lootPos");
+_itemTypes = [] + getArray (_config >> "itemType");
+_lootChance = getNumber (_config >> "lootChance");
_itemChance = [] + getArray (_config >> "itemChance");
+_countPositions = count _positions;
+//_qty = 0; // effective quantity of spawned weaponholder
{
- private["_iPos2"];
- _iPos2 = _obj modelToWorld _x;
- _rnd = random 1;
-
- //Place something at each position
- _nearBy = _iPos2 nearObjects ["ReammoBox",2];
+ //if (count _x == 3) then {
+ _rnd = random 1;
+ _iPos = _obj modelToWorld _x;
+ _nearBy = _iPos nearObjects ["ReammoBox",2];
{deleteVehicle _x} forEach _nearBy;
- if (count _nearBy > 0) then {
- _lootChance = _lootChance + 0.05;
+ if (count _nearBy > 0) then {
+ _lootChance = _lootChance + 0.05;
};
- if (_rnd < _lootChance) then {
-
- private["_index","_iArray"];
- _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
- _index = _weights call BIS_fnc_selectRandom;
- if (_index >= 0) then {
- _iArray = +(_itemType select _index);
- _iArray set [2,_iPos2];
- _iArray set [3,0];
- _iArray set [4,_type];
- _iArray call spawn_loot;
- _iArray = [];
- };
- _item setVariable ["created",(DateToNumber date),true];
+ if (_rnd <= _lootChance) then {
+ //if (count _nearBy == 0) then {
+ _index = dayz_CBLBase find _type;
+ _weights = dayz_CBLChances select _index;
+ _cntWeights = count _weights;
+ _index = floor(random _cntWeights);
+ _index = _weights select _index;
+ _itemType = _itemTypes select _index;
+ [_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot;
+ //_qty = _qty +1;
+ //};
+ _obj setVariable ["created",(DateToNumber date),true];
};
-/* we don't need this, plus I don't feel like perfecting it..
- //add wait for player to leave
- _playerNear = ({isPlayer _x} count (player nearEntities ["AllVehicles", 10]) >= 1);
- if (_playerNear) then {
- _slowRun = true;
- hint "_slowRun was set to true";
- } else {
- _slowRun = false;
- };
- if (_slowRun) then {
- hint "wait started";
- waitUntil {!_playerNear};
- diag_log ("Wait: DONE!");
- };
-*/
-} forEach _positions;
\ No newline at end of file
+ //sleep ((random 3) / 1000);
+ //};
+} forEach _positions;
+
+//_qty
diff --git a/@DayZRedux/Addons/dayz_code/compile/building_spawnLootOLD.sqf b/@DayZRedux/Addons/dayz_code/compile/building_spawnLootOLD.sqf
new file mode 100644
index 0000000..062f5fb
--- /dev/null
+++ b/@DayZRedux/Addons/dayz_code/compile/building_spawnLootOLD.sqf
@@ -0,0 +1,39 @@
+private ["_serial","_positions","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_allItems","_items","_itemType","_itemChance","_lootChance","_weights","_index"];
+
+_obj = _this select 0;
+_type = typeOf _obj;
+_config = configFile >> "CfgBuildingLoot" >> _type;
+_positions = [] + getArray (_config >> "lootPos");
+_lootChance = getNumber (_config >> "lootChance");
+_itemType = [] + getArray (_config >> "itemType");
+_itemChance = [] + getArray (_config >> "itemChance");
+
+{
+ private ["_iPos2"];
+ _iPos2 = _obj modelToWorld _x;
+ _rnd = random 1;
+
+ //Place something at each position
+ _nearBy = _iPos2 nearObjects ["ReammoBox",2];
+ {deleteVehicle _x} forEach _nearBy;
+
+ if (count _nearBy > 0) then {
+ _lootChance = _lootChance + 0.05;
+ };
+
+ if (_rnd < _lootChance) then {
+
+ private ["_index","_iArray"];
+ _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
+ _index = _weights call BIS_fnc_selectRandom;
+ if (_index >= 0) then {
+ _iArray = +(_itemType select _index);
+ _iArray set [2,_iPos2];
+ _iArray set [3,0];
+ _iArray set [4,_type];
+ _iArray call spawn_loot;
+ _iArray = [];
+ };
+ _obj setVariable ["created",(DateToNumber date),true];
+ };
+} forEach _positions;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/building_spawnZombies.sqf b/@DayZRedux/Addons/dayz_code/compile/building_spawnZombies.sqf
index d6ee4d9..e1c848d 100644
--- a/@DayZRedux/Addons/dayz_code/compile/building_spawnZombies.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/building_spawnZombies.sqf
@@ -1,4 +1,4 @@
-private["_obj","_type","_config","_canLoot","_unitTypes","_min","_max","_num","_zombieChance","_rnd","_noPlayerNear","_position","_clean","_positions","_iPos","_nearBy","_nearByPlayer","_i"];
+private ["_obj","_type","_config","_canLoot","_unitTypes","_min","_max","_num","_zombieChance","_rnd","_noPlayerNear","_position","_clean","_positions","_iPos","_nearBy","_nearByPlayer","_i"];
_obj = _this select 0;
_type = typeOf _obj;
_config = configFile >> "CfgBuildingLoot" >> _type;
diff --git a/@DayZRedux/Addons/dayz_code/compile/control_zombieAgent.sqf b/@DayZRedux/Addons/dayz_code/compile/control_zombieAgent.sqf
index 30de1d2..67c2c9c 100644
--- a/@DayZRedux/Addons/dayz_code/compile/control_zombieAgent.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/control_zombieAgent.sqf
@@ -1,4 +1,4 @@
-private["_agent","_id","_list","_isSomeone","_isAlive","_target","_targetPos","_myDest"];
+private ["_agent","_id","_list","_isSomeone","_isAlive","_target","_targetPos","_myDest"];
//Definitions
_agent = _this select 0;
diff --git a/@DayZRedux/Addons/dayz_code/compile/dog_findTargetAgent.sqf b/@DayZRedux/Addons/dayz_code/compile/dog_findTargetAgent.sqf
index dcf8a55..ebb2a7c 100644
--- a/@DayZRedux/Addons/dayz_code/compile/dog_findTargetAgent.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/dog_findTargetAgent.sqf
@@ -1,4 +1,4 @@
-private["_dog","_target","_targets","_man","_manDis"];
+private ["_dog","_target","_targets","_man","_manDis"];
_dog = _this;
_target = objNull;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_buildWeightedArray.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_buildWeightedArray.sqf
index 55732b8..53e17cb 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_buildWeightedArray.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_buildWeightedArray.sqf
@@ -18,7 +18,7 @@ scriptName "Functions\arrays\fn_selectRandomWeighted.sqf";
[*] Algorithm is inefficient?
*/
-private["_array","_weights","_weighted","_i","_k"];
+private ["_array","_weights","_weighted","_i","_k"];
_array = _this select 0;
_weights = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_curTimeStr.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_curTimeStr.sqf
index 19669a8..cb6044c 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_curTimeStr.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_curTimeStr.sqf
@@ -1,4 +1,4 @@
-private["_curDate","_hr","_min","_hrStr","_minStr","_strTime"];
+private ["_curDate","_hr","_min","_hrStr","_minStr","_strTime"];
_curDate = date;
_hr = _curDate select 3;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_damageActions.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_damageActions.sqf
index f04aacc..dde77da 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_damageActions.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_damageActions.sqf
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageActions.sqf";
- Function
- [] call fnc_usec_damageActions;
************************************************************/
-private["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_bag","_classbag","_assignedRole","_turret","_weapons","_weaponName","_action","_unit","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasEtool","_hasWire","_hasPainkillers","_action1","_action2","_vehType","_type","_typeVeh","_weapon","_magTypes","_ammoSerial","_ammoQty","_displayName","_isEngineer","_index","_inventory","_unitTo","_crew","_unconscious_crew","_patients","_y"];
+private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_bag","_classbag","_assignedRole","_turret","_weapons","_weaponName","_action","_unit","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasEtool","_hasWire","_hasPainkillers","_action1","_action2","_vehType","_type","_typeVeh","_weapon","_magTypes","_ammoSerial","_ammoQty","_displayName","_isEngineer","_index","_inventory","_unitTo","_crew","_unconscious_crew","_patients","_y"];
_menClose = cursorTarget;
_hasPatient = alive _menClose;
@@ -13,32 +13,7 @@ _inVehicle = (_vehicle != player);
_isClose = ((player distance _menClose) < ((sizeOf typeOf _menClose) / 2));
_bag = unitBackpack player;
_classbag = typeOf _bag;
-/*
-if (_inVehicle) then {
- r_player_lastVehicle = _vehicle;
- _assignedRole = assignedVehicleRole player;
- if (str (_assignedRole) != str (r_player_lastSeat)) then {
- call r_player_removeActions2;
- };
- if (!r_player_unconscious && !r_action2) then {
- r_player_lastSeat = _assignedRole;
- if (count _assignedRole > 1) then {
- _turret = _assignedRole select 1;
- _weapons = _vehicle weaponsTurret _turret;
- {
- _weaponName = getText (configFile >> "cfgWeapons" >> _x >> "displayName");
- _action = _vehicle addAction [format["Add AMMO to %1",_weaponName], "\z\addons\dayz_code\actions\ammo.sqf",[_vehicle,_x,_turret], 0, false, true];
- r_player_actions2 set [count r_player_actions2,_action];
- r_action2 = true;
- } forEach _weapons;
- };
- };
-} else {
- call r_player_removeActions2;
- r_player_lastVehicle = objNull;
- r_player_lastSeat = [];
-};
-*/
+
if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unconscious and _isClose) then {
_unit = cursorTarget;
player reveal _unit;
@@ -62,7 +37,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
_hasPainkillers = "ItemPainkiller" in magazines player;
//Allow player to drag
- if(_unconscious) then {
+ if (_unconscious) then {
r_action = true;
_action1 = _unit addAction [localize "str_actions_medical_01", "\z\addons\dayz_code\medical\drag.sqf",_unit, 0, true, true];
_action2 = _unit addAction [localize "str_actions_medical_02", "\z\addons\dayz_code\medical\pulse.sqf",_unit, 0, true, true];
@@ -78,37 +53,38 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
_y = _y + 1;
_vehicle = (_vehClose select _y);
};
- _vehType = typeOf _vehicle;
+ _vehType = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
+ //_vehType = typeOf _vehicle;
_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];
r_player_actions set [count r_player_actions,_action];
};
//Allow player to bandage
- if(_injured and _hasBandage) then {
+ if (_injured and _hasBandage) then {
r_action = true;
//_unit setdamage 0.8;
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit], 0, true, true, "", "'ItemBandage' in magazines player"];
r_player_actions set [count r_player_actions,_action];
};
//Allow player to give Epinephrine
- if(_unconscious and _hasEpi) then {
+ if (_unconscious and _hasEpi) then {
r_action = true;
_action = _unit addAction [localize "str_actions_medical_05", "\z\addons\dayz_code\medical\epinephrine.sqf",[_unit], 0, true, true];
r_player_actions set [count r_player_actions,_action];
};
//Allow player to give Morphine
- if((_legsBroke or _armsBroke) and _hasMorphine) then {
+ if ((_legsBroke or _armsBroke) and _hasMorphine) then {
r_action = true;
_action = _unit addAction [localize "str_actions_medical_06", "\z\addons\dayz_code\medical\morphine.sqf",[_unit], 0, true, true, "", "'ItemMorphine' in magazines player"];
r_player_actions set [count r_player_actions,_action];
};
//Allow player to give Painkillers
- if(_inPain and _hasPainkillers) then {
+ if (_inPain and _hasPainkillers) then {
r_action = true;
_action = _unit addAction [localize "str_actions_medical_07", "\z\addons\dayz_code\medical\painkiller.sqf",[_unit], 0, true, true, "", "'ItemPainkiller' in magazines player"];
r_player_actions set [count r_player_actions,_action];
};
//Allow player to transfuse blood
- if(_lowBlood and _hasBlood) then {
+ if (_lowBlood and _hasBlood) then {
r_action = true;
_action = _unit addAction [localize "str_actions_medical_08", "\z\addons\dayz_code\medical\transfusion.sqf",[_unit], 0, true, true, "", "'ItemBloodbag' in magazines player"];
r_player_actions set [count r_player_actions,_action];
@@ -118,7 +94,8 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
if ((_unit isKindOf "AllVehicles") and !(_unit isKindOf "Man")) then {
_type = TypeOf(_unit);
_typeVeh = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
-
+ _isVehicle = cursorTarget isKindOf "AllVehicles";
+
//CAN WE REFUEL THE OBJECT?
if ((fuel _unit < 1) and (_hasJerry or _hasFuel5)) then {
r_action = true;
@@ -131,6 +108,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
r_player_actions set [count r_player_actions,_action];
};
//CAN WE ISSUE ANOTHER KIND OF AMMUNITION?
+ /*
if (count weapons _unit > 0) then {
//Get mag array
_weapon = weapons _unit select 0;
@@ -150,19 +128,21 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
};
} forEach _magTypes;
};
+ */
//CAN CARRY BACKPACK
+ /*
if ((_type in USEC_PackableObjects) and (_classbag == "")) then {
r_action = true;
_action = _unit addAction [format[localize "str_actions_medical_12",_typeVeh], "\z\addons\dayz_code\actions\pack.sqf",[_unit], 0, true, true];
r_player_actions set [count r_player_actions,_action];
- };
+ }; */
};
if ((_unit isKindOf "Building")) then {
_type = TypeOf(_unit);
_typeVeh = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_isEngineer = _hasToolbox;//(_classbag isKindOf "BAF_AssaultPack_Engineer");
//CAN DISASSEMBLE
- if (_isEngineer and (_type in USEC_CanDisassemble)) then {
+ if (_isEngineer and (_type in ["usec_wire_cat1", "usec_wire_cat2", "Land_Mag_RX", "Land_Cont_RX", "Land_Cont2_RX", "tentStorage", "Wire_cat1", "Sandbag1_DZ", "Hedgehog_DZ", "BearTrap_DZ"])) then {
r_action = true;
_index = USEC_CanDisassemble find _type;
_inventory = USEC_DisassembleKits select _index;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_damageHandler.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_damageHandler.sqf
index 13ff7e1..4ae8cd7 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_damageHandler.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_damageHandler.sqf
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageHandler.sqf";
- Function
- [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler;
************************************************************/
-private["_unit","_humanityHit","_myKills","_isBandit","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_isHeadHit","_inVehicle","_isMinor","_scale","_canHitFree"];
+private ["_unit","_humanityHit","_myKills","_isBandit","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_isHeadHit","_inVehicle","_isMinor","_scale","_canHitFree"];
_unit = _this select 0;
_hit = _this select 1;
_damage = _this select 2;
@@ -177,7 +177,7 @@ if (_damage > 0.4) then { //0.25
_id = [_source,"shothead"] spawn player_death;
};
};
- if(!_isHit) then {
+ if (!_isHit) then {
//Create Wound
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerVehicle.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerVehicle.sqf
index 1864a5f..e6ae489 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerVehicle.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerVehicle.sqf
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageHandler.sqf";
- Function
- [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler;
************************************************************/
-private["_unit","_hit","_damage","_source","_ammo","_total"];
+private ["_unit","_hit","_damage","_source","_ammo","_total"];
_unit = _this select 0;
_hit = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerZ.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerZ.sqf
index 247cf76..648b539 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerZ.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_damageHandlerZ.sqf
@@ -1,7 +1,7 @@
//[unit, selectionName, damage, source, projectile]
//will only run when local to the created object
//record any key hits to the required selection
-private["_zed","_selection","_damage","_hitter","_projectile","_headShots","_damageOrg","_unit"];
+private ["_zed","_selection","_damage","_hitter","_projectile","_headShots","_damageOrg","_unit"];
_zed = _this select 0;
_selection = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_inAngleSector.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_inAngleSector.sqf
index c9a3157..1181330 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_inAngleSector.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_inAngleSector.sqf
@@ -15,7 +15,7 @@
// Revision History:
// 09/01/08 0.1 - First cut VBS2
//------------------
-private["_r","_small","_large","_xpos","_ypos","_dir1","_dir2","_dir3"];
+private ["_r","_small","_large","_xpos","_ypos","_dir1","_dir2","_dir3"];
_r = false;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_inString.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_inString.sqf
index db1ef0a..7e62c8a 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_inString.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_inString.sqf
@@ -1,7 +1,7 @@
//Kilzone_Kid's megafast inString function
//caseinsensitive
//params [needle,haystack];
-private["_needle","_haystack","_haystackArr","_haystackLen","_needleLen","_found","_hayArr","_i"];
+private ["_needle","_haystack","_haystackArr","_haystackLen","_needleLen","_found","_hayArr","_i"];
scopeName "main";
_needle = _this select 0;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_isInsideBuilding.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_isInsideBuilding.sqf
index 13971b6..9bdc81a 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_isInsideBuilding.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_isInsideBuilding.sqf
@@ -1,4 +1,4 @@
-private["_unit1","_building","_type","_relPos","_boundingBox","_min","_max","_myX","_myY","_myZ","_inside"];
+private ["_unit1","_building","_type","_relPos","_boundingBox","_min","_max","_myX","_myY","_myZ","_inside"];
_unit1 = _this select 0;
//_building = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_selectRandom.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_selectRandom.sqf
index e1e7d67..54ec16e 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_selectRandom.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_selectRandom.sqf
@@ -10,9 +10,9 @@ This returns a randomly selected element from the passed array.
Example: [1,2,3] call BIS_fnc_selectRandom
Returns: 1, 2, or 3
************************************************************/
-private["_ret"];
+private ["_ret"];
-if(count _this > 0) then
+if (count _this > 0) then
{
_ret = (count _this) - 1; //number of elements in the array
//_ret = [0, _ret] call BIS_fnc_randomInt; //choose random index
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_selectRandomWeighted.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_selectRandomWeighted.sqf
index b277b34..ce5696f 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_selectRandomWeighted.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_selectRandomWeighted.sqf
@@ -18,7 +18,7 @@ scriptName "Functions\arrays\fn_selectRandomWeighted.sqf";
[*] Algorithm is inefficient?
*/
-private["_array", "_weights","_index","_weighted","_i","_k"];
+private ["_array", "_weights","_index","_weighted","_i","_k"];
_array = _this select 0;
_weights = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_selfActions.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_selfActions.sqf
index 983d501..5931e5c 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_selfActions.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_selfActions.sqf
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
- Function
- [] call fnc_usec_selfActions;
************************************************************/
-private ["_vehicle","_hasChloroform","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasFuel5","_hasbottleitem","_hastinitem","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_rawmeat","_hasRawMeat","_allFixed","_hitpoints","_damage","_part","_cmpt","_damagePercent","_color","_string","_handle","_dogHandle","_lieDown","_warn","_dog","_speed","_array","_newArray","_toStr","_fullPartName","_glassName","_isStorageBox","_hasMatches"];
+private ["_vehicle","_hasChloroform","_inVehicle","_nearGrave","_isDoing","_animState","_bag","_bodyPos","_bodyATL","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasFuel5","_hasbottleitem","_hastinitem","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_rawmeat","_hasRawMeat","_allFixed","_hitpoints","_damage","_part","_cmpt","_damagePercent","_color","_string","_handle","_dogHandle","_lieDown","_warn","_dog","_speed","_array","_newArray","_toStr","_fullPartName","_glassName","_isStorageBox","_hasMatches"];
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
@@ -27,12 +27,15 @@ _hastinitem = false;
_hasKnife = "ItemKnife" in items player;
_hasToolbox = "ItemToolbox" in items player;
+_hasETool = "ItemEtool" in items player;
//_hasTent = "ItemTent" in items player;
_hasChloroform = "ItemChloroform" in magazines player;
_hasMatches = "ItemMatchbox" in items player;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_nearLight = nearestObject [player,"LitObject"];
_canPickLight = false;
+_animState = animationState player;
+_isDoing = ["medic",_animState] call fnc_inString;
if (!isNull _nearLight) then {
if (_nearLight distance player < 4) then {
@@ -65,12 +68,16 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_isDog = (cursorTarget isKindOf "DZ_Pastor" || cursorTarget isKindOf "DZ_Fin");
_isZombie = cursorTarget isKindOf "zZambie_Base";
_isDestructable = cursorTarget isKindOf "BuiltItems";
- _isTent = (cursorTarget isKindOf "Land_Cont_RX") or (cursorTarget isKindOf "Land_Cont2_RX");
- _isStorageBox = cursorTarget isKindOf "Land_Mag_RX";
+ _isTent = (cursorTarget isKindOf "Land_Cont_RX") or (cursorTarget isKindOf "Land_Cont2_RX");
+ _isStorageBox = cursorTarget isKindOf "Land_Mag_RX";
_isFuel = false;
_isAlive = alive cursorTarget;
_canmove = canmove cursorTarget;
+ _nearGrave = nearestObject [cursorTarget,"Fort_EnvelopeSmall"];
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
+ _bodyPos = getPosATL cursorTarget;
+ _bodyHeight = _bodyPos select 2;
+ _bodyATL = _bodyHeight >= -0.2;
_rawmeat = meatraw;
@@ -88,7 +95,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
//diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID));
//Allow player to delete objects
- if(_isDestructable and _hasToolbox and _canDo) then {
+ if (_isDestructable and _hasToolbox and _canDo) then {
if (s_player_deleteBuild < 0) then {
s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",cursorTarget, 1, true, true, "", ""];
};
@@ -99,7 +106,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
/*
//Allow player to force save
- if((_isVehicle or _isTent) and _canDo and !_isMan) then {
+ if ((_isVehicle or _isTent) and _canDo and !_isMan) then {
if (s_player_forceSave < 0) then {
s_player_forceSave = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",cursorTarget, 1, true, true, "", ""];
};
@@ -119,7 +126,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
//Allow player to set tent ablaze
- if(_isTent and _hasMatches and _canDo and !_isMan) then {
+ if (_isTent and _hasMatches and _canDo and !_isMan) then {
if (s_player_igniteTentSwitch < 0) then {
s_player_igniteTentSwitch = player addAction [format[localize "str_actions_ignite_tent"], "\z\addons\dayz_code\actions\confirm_ignite.sqf", cursorTarget, 1, true, false, "", ""];
};
@@ -129,7 +136,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
//Allow player to set storage box ablaze
- if(_isStorageBox and _hasMatches and _canDo and !_isMan and _isAlive) then {
+ if (_isStorageBox and _hasMatches and _canDo and !_isMan and _isAlive) then {
if (s_player_igniteBoxSwitch < 0) then {
s_player_igniteBoxSwitch = player addAction [format[localize "str_actions_ignite_box"], "\z\addons\dayz_code\actions\confirm_ignite.sqf", cursorTarget, 1, true, false, "", ""];
};
@@ -139,7 +146,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
//Allow player to fill jerrycan
- if((_hasFuelE or _hasFuel5) and _isFuel and _canDo) then {
+ if ((_hasFuelE or _hasFuel5) and _isFuel and _canDo) then {
if (s_player_fillfuel < 0) then {
s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",[], 1, false, true, "", ""];
};
@@ -175,7 +182,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
s_player_boil = -1;
};
- if(cursorTarget == dayz_hasFire and _canDo) then {
+ if (cursorTarget == dayz_hasFire and _canDo) then {
if ((s_player_fireout < 0) and !(inflamed cursorTarget) and (player distance cursorTarget < 3)) then {
s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",cursorTarget, 0, false, true, "",""];
};
@@ -185,7 +192,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
//Packing my tent
- if(((cursorTarget isKindOf "Land_Cont_RX") or (cursorTarget isKindOf "Land_Cont2_RX")) and _canDo and _ownerID == dayz_characterID) then {
+ if (((cursorTarget isKindOf "Land_Cont_RX") or (cursorTarget isKindOf "Land_Cont2_RX")) and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_packtent < 0) and (player distance cursorTarget < 3)) then {
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",cursorTarget, 0, false, true, "",""];
};
@@ -196,7 +203,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
//Sleep -- USELESS
/*
- if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
+ if (cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_sleep < 0) and (player distance cursorTarget < 3)) then {
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",cursorTarget, 0, false, true, "",""];
};
@@ -206,7 +213,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
*/
//Retrieving my box
- if((cursorTarget isKindOf "Land_Mag_RX") and _canDo and _ownerID == dayz_characterID and _isAlive) then {
+ if ((cursorTarget isKindOf "Land_Mag_RX") and _canDo and _ownerID == dayz_characterID and _isAlive) then {
if ((s_player_retrievebox < 0) and (player distance cursorTarget < 3)) then {
s_player_retrievebox = player addAction [localize "str_actions_self_11", "\z\addons\dayz_code\actions\box_retrieve.sqf",cursorTarget, 0, false, true, "",""];
};
@@ -216,10 +223,11 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
// Remove Parts from Vehicles - By SilverShot.
- if( !_isMan and _canDo and _hasToolbox and (silver_myCursorTarget != cursorTarget) and cursorTarget isKindOf "AllVehicles" and (getDammage cursorTarget < 0.95) ) then {
+
+ if ( !_isMan and _canDo and _hasToolbox and (silver_myCursorTarget != cursorTarget) and cursorTarget isKindOf "AllVehicles" and (getDammage cursorTarget < 0.95) ) then {
_vehicle = cursorTarget;
_invalidVehicle = (_vehicle isKindOf "Motorcycle") or (_vehicle isKindOf "Tractor") or (_vehicle isKindOf "Ship") or (_vehicle isKindOf "ATV_Base_EP1"); //or (_vehicle isKindOf "ATV_US_EP1") or (_vehicle isKindOf "ATV_CZ_EP1");
- if( !_invalidVehicle ) then {
+ if ( !_invalidVehicle ) then {
{silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
s_player_removeActions = [];
@@ -228,9 +236,10 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_hitpoints = _vehicle call vehicle_getHitpoints;
{
+ _color = "";
_damage = [_vehicle,_x] call object_getHit;
- if( _damage < 0.15 ) then {
+ if ( _damage < 0.15 ) then {
//change "HitPart" to " - Part" rather than complicated string replace
_cmpt = toArray (_x);
@@ -240,19 +249,19 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_cmpt = toString _cmpt;
_skip = true;
- if((_damage < 10) and _skip and _x == "HitFuel" ) then { _skip = false; _part = "PartFueltank"; _cmpt = _cmpt + "tank"};
- if((_damage < 10) and _skip and _x == "HitEngine" ) then { _skip = false; _part = "PartEngine"; };
- if((_damage < 10) and _skip and _x == "HitLFWheel" ) then { _skip = false; _part = "PartWheel"; };
- if((_damage < 10) and _skip and _x == "HitRFWheel" ) then { _skip = false; _part = "PartWheel"; };
- if((_damage < 10) and _skip and _x == "HitLBWheel" ) then { _skip = false; _part = "PartWheel"; };
- if((_damage < 10) and _skip and _x == "HitRBWheel" ) then { _skip = false; _part = "PartWheel"; };
- if((_damage < 10) and _skip and _x == "HitGlass1" ) then { _skip = false; _part = "PartGlass"; };
- if((_damage < 10) and _skip and _x == "HitGlass2" ) then { _skip = false; _part = "PartGlass"; };
- if((_damage < 10) and _skip and _x == "HitGlass3" ) then { _skip = false; _part = "PartGlass"; };
- if((_damage < 10) and _skip and _x == "HitGlass4" ) then { _skip = false; _part = "PartGlass"; };
- if((_damage < 10) and _skip and _x == "HitGlass5" ) then { _skip = false; _part = "PartGlass"; };
- if((_damage < 10) and _skip and _x == "HitGlass6" ) then { _skip = false; _part = "PartGlass"; };
- if((_damage < 10) and _skip and _x == "HitHRotor" ) then { _skip = false; _part = "PartVRotor"; };
+ if ((_damage < 10) and _skip and _x == "HitFuel" ) then { _skip = false; _part = "PartFueltank"; _cmpt = _cmpt + "tank"};
+ if ((_damage < 10) and _skip and _x == "HitEngine" ) then { _skip = false; _part = "PartEngine"; };
+ if ((_damage < 10) and _skip and _x == "HitLFWheel" ) then { _skip = false; _part = "PartWheel"; };
+ if ((_damage < 10) and _skip and _x == "HitRFWheel" ) then { _skip = false; _part = "PartWheel"; };
+ if ((_damage < 10) and _skip and _x == "HitLBWheel" ) then { _skip = false; _part = "PartWheel"; };
+ if ((_damage < 10) and _skip and _x == "HitRBWheel" ) then { _skip = false; _part = "PartWheel"; };
+ if ((_damage < 10) and _skip and _x == "HitGlass1" ) then { _skip = false; _part = "PartGlass"; };
+ if ((_damage < 10) and _skip and _x == "HitGlass2" ) then { _skip = false; _part = "PartGlass"; };
+ if ((_damage < 10) and _skip and _x == "HitGlass3" ) then { _skip = false; _part = "PartGlass"; };
+ if ((_damage < 10) and _skip and _x == "HitGlass4" ) then { _skip = false; _part = "PartGlass"; };
+ if ((_damage < 10) and _skip and _x == "HitGlass5" ) then { _skip = false; _part = "PartGlass"; };
+ if ((_damage < 10) and _skip and _x == "HitGlass6" ) then { _skip = false; _part = "PartGlass"; };
+ if ((_damage < 10) and _skip and _x == "HitHRotor" ) then { _skip = false; _part = "PartVRotor"; };
if (!_skip ) then {
_string = format["Remove%1",_cmpt,_color]; //Remove - Part
@@ -283,47 +292,47 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_part = "PartGeneric";
_cmpt = _x;
_damagePercent = round((1 - _damage) * 100);
- if(["Body",_x,false] call fnc_inString) then {
+ if (["Body",_x,false] call fnc_inString) then {
_part = "PartGeneric";
_cmpt = "Body";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Engine",_x,false] call fnc_inString) then {
+ if (["Engine",_x,false] call fnc_inString) then {
_part = "PartEngine";
_cmpt = "Engine";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["HRotor",_x,false] call fnc_inString) then {
+ if (["HRotor",_x,false] call fnc_inString) then {
_part = "PartVRotor";
_cmpt = "Main Rotor Assembly";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Avionics",_x,false] call fnc_inString) then {
+ if (["Avionics",_x,false] call fnc_inString) then {
_part = "PartGeneric";
_cmpt = "Avionics";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Missiles",_x,false] call fnc_inString) then {
+ if (["Missiles",_x,false] call fnc_inString) then {
_part = "PartGeneric";
_cmpt = "Missiles";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["VRotor",_x,false] call fnc_inString) then {
+ if (["VRotor",_x,false] call fnc_inString) then {
_part = "PartGeneric";
_cmpt = "Rear Rotor Assembly";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Hull",_x,false] call fnc_inString) then {
+ if (["Hull",_x,false] call fnc_inString) then {
_part = "PartGeneric";
_cmpt = "Hull";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Fuel",_x,false] call fnc_inString) then {
+ if (["Fuel",_x,false] call fnc_inString) then {
_part = "PartFueltank";
_cmpt = "Fuel Tank";
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Wheel",_x,false] call fnc_inString) then {
+ if (["Wheel",_x,false] call fnc_inString) then {
_part = "PartWheel";
_cmpt = "Wheel";
_array = toArray _x;
@@ -349,7 +358,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_cmpt = _cmpt + " " + _toStr;
if (_damagePercent < 95) then {_allFixed = false};
};
- if(["Glass",_x,false] call fnc_inString) then {
+ if (["Glass",_x,false] call fnc_inString) then {
_part = "PartGlass";
_fullPartName = toArray _x;
@@ -391,6 +400,35 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
player removeAction s_player_studybody;
s_player_studybody = -1;
};
+ //Dig grave
+ if (_isMan and !_isAlive and !_isAnimal and _hasETool and !_inVehicle and _canDo and (_nearGrave distance cursorTarget > 1) and _bodyATL and !_isDoing) then {
+ if (s_player_diggrave < 0) then {
+ s_player_diggrave = player addAction [localize "str_action_diggrave", "\z\addons\dayz_code\actions\dig_grave.sqf",cursorTarget, 0, false, true, "",""];
+ };
+ } else {
+ player removeAction s_player_diggrave;
+ s_player_diggrave = -1;
+ };
+ //Drag body
+ if (_isMan and !_isAlive and !_isAnimal and _canDo and (_nearGrave distance cursorTarget > 1) and !_inVehicle and _bodyATL and !_isDoing) then {
+ if (s_player_dragbody < 0) then {
+ forceDrag = true;
+ s_player_dragbody = player addAction [localize "str_actions_medical_01", "\z\addons\dayz_code\medical\drag.sqf",cursorTarget, 0, true, true];
+ };
+ } else {
+ player removeAction s_player_dragbody;
+ s_player_dragbody = -1;
+ forceDrag = false;
+ };
+ //Bury body
+ if ((_isMan and !_isAlive and _hasETool and _canDo and !_inVehicle and _bodyATL and !_isDoing and (_nearGrave distance cursorTarget <= 1)) or (_canDo and !_inVehicle and !_isMan and !_isAlive and !_isZombie and _isAnimal and _bodyATL)) then {
+ if (s_player_burybody < 0) then {
+ s_player_burybody = player addAction [localize "str_action_burybody", "\z\addons\dayz_code\actions\hide_body.sqf",cursorTarget, 0, false, true, "",""];
+ };
+ } else {
+ player removeAction s_player_burybody;
+ s_player_burybody = -1;
+ };
//Dog
if (_isDog and _isAlive and (_hasRawMeat) and _canDo and _ownerID == "0" and player getVariable ["dogID", 0] == 0) then {
@@ -475,6 +513,12 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
s_player_deleteBuild = -1;
player removeAction s_player_butcher;
s_player_butcher = -1;
+ player removeAction s_player_diggrave;
+ s_player_diggrave = -1;
+ player removeAction s_player_dragbody;
+ s_player_dragbody = -1;
+ player removeAction s_player_burybody;
+ s_player_burybody = -1;
player removeAction s_player_cook;
s_player_cook = -1;
player removeAction s_player_boil;
@@ -484,7 +528,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
player removeAction s_player_packtent;
s_player_packtent = -1;
player removeAction s_player_retrievebox;
- s_player_retrievebox = -1;
+ s_player_retrievebox = -1;
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
player removeAction s_player_studybody;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_setpitchbank.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_setpitchbank.sqf
index b4eba64..f677ddb 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_setpitchbank.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_setpitchbank.sqf
@@ -20,7 +20,7 @@ which should be issued before using this function, if required.
The pitch/bank can be leveled out (set to 0) by using the
setdir command.
************************************************************/
-private["_obj","_pitch","_bank","_yaw","_rotate","_sign","_vdir","_vup"];
+private ["_obj","_pitch","_bank","_yaw","_rotate","_sign","_vdir","_vup"];
_obj = _this select 0;
_pitch = _this select 1;
@@ -67,11 +67,11 @@ _sign = [1,-1] select (_pitch < 0);
while {abs _pitch > 180} do {_pitch = _sign*(abs _pitch - 180)};
//we can't use pitch that is exactly equal to 90, because then the engine doesn't know what 2d compass direction the object is facing
-if(abs _pitch == 90) then {_pitch = _sign*(89.9)};
+if (abs _pitch == 90) then {_pitch = _sign*(89.9)};
//we can't pitch beyond 90 degrees without changing the facing of our object
//(pitching beyond 90 degrees means that the object's eyes will point in the 2d compass direction that its back used to point)
-if(abs _pitch > 90) then
+if (abs _pitch > 90) then
{
//we are rolling upside down; flip our direction (yaw)
_obj setdir (getdir _obj)-180;
@@ -102,7 +102,7 @@ _sign = [1,-1] select (_bank < 0);
while {abs _bank > 360} do {_bank = _sign*(abs _bank - 360)};
//reflect numbers above 180
-if(abs _bank > 180) then {_sign = -1*_sign; _bank = (360-_bank)*_sign};
+if (abs _bank > 180) then {_sign = -1*_sign; _bank = (360-_bank)*_sign};
//find appropriate vup according to our bank, as if we were facing north
_vup = [sin _bank, 0, cos _bank];
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_sunRise.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_sunRise.sqf
index c74d6a4..e4c3db1 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_sunRise.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_sunRise.sqf
@@ -14,7 +14,7 @@
Reference:
http://forums.bistudio.com/showthread.php?107476-How-do-I-detect-sundown-sunrise
*/
-private["_lat","_day","_hour","_daytime"];
+private ["_lat","_day","_hour","_daytime"];
_lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude");
_day = 360 * (dateToNumber date);
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_surfaceNoise.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_surfaceNoise.sqf
index 60c035e..b089378 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_surfaceNoise.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_surfaceNoise.sqf
@@ -1,5 +1,5 @@
//Assess Terrain
-private["_unit","_pos","_type","_typeA","_test","_soundType","_soundVal","_array"];
+private ["_unit","_pos","_type","_typeA","_test","_soundType","_soundVal","_array"];
_unit = _this;
_pos = getPosATL _unit;
_type = surfaceType _pos;
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_temperatur.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_temperatur.sqf
index c415666..a7754ff 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_temperatur.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_temperatur.sqf
@@ -19,7 +19,7 @@ Missing:
*/
-private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","_rain_factor","_night_factor","_wind_factor","_building_factor","_sun_factor","_water_factor","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_vel","_speed","_fireplaces","_building","_daytime","_height_mod","_temp"];
+private ["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","_rain_factor","_night_factor","_wind_factor","_building_factor","_sun_factor","_water_factor","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_vel","_speed","_fireplaces","_building","_daytime","_height_mod","_temp"];
_looptime = _this;
_model = typeOf player;
@@ -38,70 +38,69 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
_building_factor = 2;
};
- _water_factor = -8;
- _rain_factor = -6; // -3
- _night_factor = -4; // -1.5
- _wind_factor = -2; // -1
-
-//custom values for skins
- if (_model == "S2_RX" or _model == "S3_RX" or _model == "SW2_RX" or _model == "B1_RX" or _model == "BW1_RX" or _model == "BR1_RX" or _model == "B2_RX" or _model == "S1_RX" or _model == "R_RX") then {
- //defaults
- _water_factor = -8;
- _rain_factor = -6;
- _night_factor = -4;
- _wind_factor = -2;
- } else {
- if (_model == "CB1_RX") then {
- _water_factor = -7.5;
- _rain_factor = -6;
- _night_factor = -4;
- _wind_factor = -1.7;
- };
- if (_model == "CS1_RX") then {
- _water_factor = -7;
- _rain_factor = -5.5;
- _night_factor = -4;
- _wind_factor = -2;
- //For debug
- //hintSilent format["TEMP CS1: %1",_water_factor];
- };
- if (_model == "GS1_RX" OR _model == "GB1_RX") then {
- _water_factor = -6;
- _rain_factor = -4.5;
- _night_factor = -3;
- _wind_factor = -1.5;
- };
- if (_model == "PS1_RX") then {
- _water_factor = -7;
- _rain_factor = -4.5;
- _night_factor = -2;
- _wind_factor = -1.5;
- };
- if (_model == "PB1_RX") then {
- _water_factor = -8;
- _rain_factor = -6;
- _night_factor = -4;
- _wind_factor = -1; //windbreaker lol.
- };
-};
+//Skin perks
+ switch (_model) do {
+ case "CB1_RX" : {
+ _water_factor = -7.5;
+ _rain_factor = -4.5;
+ _night_factor = -3.5;
+ _wind_factor = -1.7;
+ };
+ case "CS1_RX" : {
+ _water_factor = -7;
+ _rain_factor = -4;
+ _night_factor = -3;
+ _wind_factor = -1.8;
+ };
+ case "GS1_RX" : {
+ _water_factor = -6;
+ _rain_factor = -4;
+ _night_factor = -3;
+ _wind_factor = -1.5;
+ };
+ case "GB1_RX" : {
+ _water_factor = -6;
+ _rain_factor = -4;
+ _night_factor = -3;
+ _wind_factor = -1.5;
+ };
+ case "PS1_RX" : {
+ _water_factor = -6;
+ _rain_factor = -4.5;
+ _night_factor = -2;
+ _wind_factor = -1.5;
+ };
+ case "PB1_RX" : {
+ _water_factor = -7.4;
+ _rain_factor = -4.5;
+ _night_factor = -3.5;
+ _wind_factor = -1;
+ };
+ default {
+ _water_factor = -8;
+ _rain_factor = -5;
+ _night_factor = -3.5;
+ _wind_factor = -2;
+ };
+ };
_difference = 0;
_hasfireffect = false;
_isinbuilding = false;
_isinvehicle = false;
- _raining = if(rain > 0) then {true} else {false};
+ _raining = if (rain > 0) then {true} else {false};
_sunrise = call world_sunRise;
- //POSITIV EFFECTS
+ //POSITIVE EFFECTS
//vehicle
- if((vehicle player) != player) then {
+ if ((vehicle player) != player) then {
_difference = _difference + _vehicle_factor;
_isinvehicle = true;
} else {
//speed factor
- private["_vel","_speed"];
+ private ["_vel","_speed"];
_vel = velocity player;
_speed = round((_vel distance [0,0,0]) * 3.5);
_difference = (_moving_factor * (_speed / 20)) min 1;
@@ -109,7 +108,7 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
//fire
_fireplaces = nearestObjects [player, ["Land_Fire","Land_Campfire"], 8];
- if(({inflamed _x} count _fireplaces) > 0 && !_isinvehicle ) then {
+ if (({inflamed _x} count _fireplaces) > 0 && !_isinvehicle ) then {
//Math: factor * 1 / (0.5*(distance max 1)^2) 0.5 = 12.5% of the factor effect in a distance o 4 meters
_difference = _difference + (_fire_factor /(0.5*((player distance (_fireplaces select 0)) max 1)^2));
_hasfireffect = true;
@@ -117,10 +116,10 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
//building
_building = nearestObject [player, "HouseBase"];
- if(!isNull _building) then {
- if([player,_building] call fnc_isInsideBuilding) then {
+ if (!isNull _building) then {
+ if ([player,_building] call fnc_isInsideBuilding) then {
//Make sure thate Fire and Building Effect can only appear single Not used at the moment
- //if(!_hasfireffect && _fire_factor > _building_factor) then {
+ //if (!_hasfireffect && _fire_factor > _building_factor) then {
_difference = _difference + _building_factor;
//};
_isinbuilding = true;
@@ -134,7 +133,7 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
//sun
- if(daytime > _sunrise && daytime < (24 - _sunrise) && !_raining && overcast <= 0.6 && !_isinbuilding) then {
+ if (daytime > _sunrise && daytime < (24 - _sunrise) && !_raining && overcast <= 0.6 && !_isinbuilding) then {
/*Mathematic Basic
@@ -165,19 +164,19 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
//NEGATIVE EFFECTS
//water
- if(surfaceIsWater getPosATL player || dayz_isSwimming) then {
+ if (surfaceIsWater getPosATL player || dayz_isSwimming) then {
_difference = _difference + _water_factor;
};
//rain
- if(_raining && !_isinvehicle && !_isinbuilding) then {
+ if (_raining && !_isinvehicle && !_isinbuilding) then {
_difference = _difference + (rain * _rain_factor);
};
//night
- if((daytime < _sunrise || daytime > (24 - _sunrise)) && !_isinvehicle) then {
- _daytime = if(daytime < 12) then {daytime + 24} else {daytime};
- if(_isinbuilding) then {
+ if ((daytime < _sunrise || daytime > (24 - _sunrise)) && !_isinvehicle) then {
+ _daytime = if (daytime < 12) then {daytime + 24} else {daytime};
+ if (_isinbuilding) then {
_difference = _difference + ((((_night_factor * -1) / (_sunrise^2)) * ((_daytime - 24)^2) + _night_factor)) / 2;
} else {
_difference = _difference + (((_night_factor * -1) / (_sunrise^2)) * ((_daytime - 24)^2) + _night_factor);
@@ -185,7 +184,7 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
};
//wind
- if(((wind select 0) > 4 || (wind select 1) > 4) && !_isinvehicle && !_isinbuilding ) then {
+ if (((wind select 0) > 4 || (wind select 1) > 4) && !_isinvehicle && !_isinbuilding ) then {
_difference = _difference + _wind_factor;
};
@@ -203,7 +202,7 @@ private["_looptime","_model","_vehicle_factor","_moving_factor","_fire_factor","
//Add Shivering
// Percent when the Shivering will start
- if(dayz_temperatur <= (0.125 * (dayz_temperaturmax - dayz_temperaturmin) + dayz_temperaturmin)) then {
+ if (dayz_temperatur <= (0.125 * (dayz_temperaturmax - dayz_temperaturmin) + dayz_temperaturmin)) then {
//CamShake as linear Function Maximum reached when Temp is at temp minimum. First Entry = Max Value
_temp = 0.6 * (dayz_temperaturmin / dayz_temperatur );
addCamShake [_temp,(_looptime + 1),30]; //[0.5,looptime,6] -> Maximum is 25% of the Pain Effect
diff --git a/@DayZRedux/Addons/dayz_code/compile/fn_unconscious.sqf b/@DayZRedux/Addons/dayz_code/compile/fn_unconscious.sqf
index d33dd96..36464bd 100644
--- a/@DayZRedux/Addons/dayz_code/compile/fn_unconscious.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/fn_unconscious.sqf
@@ -1,9 +1,11 @@
-private["_totalTimeout","_display","_ctrl1","_ctrl1Pos","_timeout","_isOnDeck","_isInLocation","_inVehicle","_bloodLow","_animType","_anim","_isHospital"];
+private ["_totalTimeout","_display","_ctrl1","_ctrl1Pos","_timeout","_isOnDeck","_isInLocation","_inVehicle","_bloodLow","_animType","_anim","_isHospital"];
disableSerialization;
if ((!r_player_handler1) and (r_handlerCount == 0)) then {
+ player switchMove ""; //reset anim state
//Unconscious Meter
_totalTimeout = r_player_timeout;
+ if (_totalTimeout == 0) then { _totalTimeout = r_player_timeout +1; }; //Fix for zero divisor
4 cutRsc ["playerStatusWaiting", "PLAIN",0];
_display = uiNamespace getVariable 'DAYZ_GUI_waiting';
_ctrl1 = _display displayCtrl 1400;
@@ -33,7 +35,7 @@ if ((!r_player_handler1) and (r_handlerCount == 0)) then {
player setpos [(getPosASL player select 0),(getPosASL player select 1),0.3];
};
- if(_timeout == 0) then {
+ if (_timeout == 0) then {
if (!r_player_dead and !_bloodLow and r_player_injured) then {
_timeout = 10;
//_animType = (USEC_WoundAnim select (floor(random (count USEC_WoundAnim))));
@@ -84,7 +86,7 @@ if ((!r_player_handler1) and (r_handlerCount == 0)) then {
if (r_player_timeout > 0 && !(player getVariable ["NORRN_unconscious", true])) then {
nul = [] spawn fnc_usec_recoverUncons;
};
- if(r_player_timeout > 0 && (animationState player == "AmovPpneMstpSnonWnonDnon_healed")) then {
+ if (r_player_timeout > 0 && (animationState player == "AmovPpneMstpSnonWnonDnon_healed")) then {
nul = [] spawn fnc_usec_recoverUncons;
};
};
diff --git a/@DayZRedux/Addons/dayz_code/compile/local_createObj.sqf b/@DayZRedux/Addons/dayz_code/compile/local_createObj.sqf
index 8143729..a350d48 100644
--- a/@DayZRedux/Addons/dayz_code/compile/local_createObj.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/local_createObj.sqf
@@ -1,4 +1,4 @@
-private["_type","_location","_dir","_character","_tent","_class","_id"];
+private ["_type","_location","_dir","_character","_tent","_class","_id"];
//[dayz_characterID,_tent,[_dir,_location],"Land_Cont_RX"]
_class = _this select 3;
_location = getPosATL player;
diff --git a/@DayZRedux/Addons/dayz_code/compile/local_deleteObj.sqf b/@DayZRedux/Addons/dayz_code/compile/local_deleteObj.sqf
index e0493f7..61378c8 100644
--- a/@DayZRedux/Addons/dayz_code/compile/local_deleteObj.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/local_deleteObj.sqf
@@ -1,4 +1,4 @@
-private["_id","_uid","_key"];
+private ["_id","_uid","_key"];
_id = _this select 0;
_uid = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/local_eventKill.sqf b/@DayZRedux/Addons/dayz_code/compile/local_eventKill.sqf
index 14d7386..8612ec0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/local_eventKill.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/local_eventKill.sqf
@@ -1,7 +1,7 @@
//[unit, selectionName, damage, source, projectile]
//will only run when local to the created object
//record any key hits to the required selection
-private["_array","_zed","_killer","_type","_kills"];
+private ["_array","_zed","_killer","_type","_kills"];
_array = _this select 0;
_zed = _array select 0;
diff --git a/@DayZRedux/Addons/dayz_code/compile/local_gutObject.sqf b/@DayZRedux/Addons/dayz_code/compile/local_gutObject.sqf
index 15772fb..33acfe6 100644
--- a/@DayZRedux/Addons/dayz_code/compile/local_gutObject.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/local_gutObject.sqf
@@ -1,4 +1,4 @@
-private["_animalbody","_qty","_rawfoodtype","_timer","_body","_ehLoc"];
+private ["_animalbody","_qty","_rawfoodtype","_timer","_body","_ehLoc"];
_animalbody = _this select 0;
_qty = _this select 1;
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> typeOf _animalbody >> "rawfoodtype");
@@ -7,7 +7,7 @@ if (local _animalbody) then {
for "_x" from 1 to _qty do {
_animalbody addMagazine _rawfoodtype;
};
-
+
[time, _animalbody] spawn {
private ["_timer", "_body"];
_timer = _this select 0;
@@ -23,7 +23,7 @@ if (local _animalbody) then {
deleteVehicle _body;
true;
};
-
+
} else {
_ehLoc = "client";
if (isServer) then { _ehLoc = "server"; };
diff --git a/@DayZRedux/Addons/dayz_code/compile/local_publishObj.sqf b/@DayZRedux/Addons/dayz_code/compile/local_publishObj.sqf
index 5ca474f..09d2699 100644
--- a/@DayZRedux/Addons/dayz_code/compile/local_publishObj.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/local_publishObj.sqf
@@ -1,4 +1,4 @@
-private["_type","_location","_dir","_character","_tent","_class","_id"];
+private ["_type","_location","_dir","_character","_tent","_class","_id"];
//[dayz_characterID,_tent,[_dir,_location],"Land_Cont_RX"]
_charID = _this select 0;
_object = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/local_setFuel.sqf b/@DayZRedux/Addons/dayz_code/compile/local_setFuel.sqf
index 9d86d6a..4f9d8fa 100644
--- a/@DayZRedux/Addons/dayz_code/compile/local_setFuel.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/local_setFuel.sqf
@@ -1,4 +1,4 @@
-private["_vehicle","_qty"];
+private ["_vehicle","_qty"];
_vehicle = _this select 0;
_qty = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_cargoCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/object_cargoCheck.sqf
index 257c6c8..de54820 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_cargoCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_cargoCheck.sqf
@@ -1,5 +1,5 @@
//_newObjects = [_previous,weapons player] call player_weaponCheck;
-private["_currentObjects","_checkObjects","_change","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial","_itemVal","_itemQty","_oldSerial","_oldQty"];
+private ["_currentObjects","_checkObjects","_change","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial","_itemVal","_itemQty","_oldSerial","_oldQty"];
_currentObjects = _this select 0;
_checkObjects = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_delLocal.sqf b/@DayZRedux/Addons/dayz_code/compile/object_delLocal.sqf
index c870925..fd7b2a5 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_delLocal.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_delLocal.sqf
@@ -1,4 +1,4 @@
-private["_type","_pos","_tent"];
+private ["_type","_pos","_tent"];
_type = _this select 0;
_pos = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_getHit.sqf b/@DayZRedux/Addons/dayz_code/compile/object_getHit.sqf
index 1bc26a6..8f3343d 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_getHit.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_getHit.sqf
@@ -1,4 +1,4 @@
-private["_unit","_hp","_selection","_strH","_dam"];
+private ["_unit","_hp","_selection","_strH","_dam"];
_unit = _this select 0;
_hp = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_monitorGear.sqf b/@DayZRedux/Addons/dayz_code/compile/object_monitorGear.sqf
index e518914..b9fc1b0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_monitorGear.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_monitorGear.sqf
@@ -1,7 +1,7 @@
-private["_countMagazines","_countWeapons","_countBackpacks","_countFreeSlots","_getControlText","_setControlText","_object","_objectName","_controlText","_magazinesMax","_weaponsMax","_backpacksMax","_distance","_isVehicle","_isMan","_isTent","_isOK","_magazines","_weapons","_backpacks","_freeSlots","_timeout"];
+private ["_countMagazines","_countWeapons","_countBackpacks","_countFreeSlots","_getControlText","_setControlText","_object","_objectName","_controlText","_magazinesMax","_weaponsMax","_backpacksMax","_distance","_isVehicle","_isMan","_isTent","_isOK","_magazines","_weapons","_backpacks","_freeSlots","_timeout"];
_countWeapons = {
- private["_weapons","_return"];
+ private ["_weapons","_return"];
_weapons = [];
_return = 0;
@@ -11,7 +11,7 @@ _countWeapons = {
};
_countMagazines = {
- private["_magazines","_return"];
+ private ["_magazines","_return"];
_magazines = [];
_return = 0;
@@ -21,7 +21,7 @@ _countMagazines = {
};
_countBackpacks = {
- private["_backpacks","_return"];
+ private ["_backpacks","_return"];
_backpacks = [];
_return = 0;
@@ -31,13 +31,13 @@ _countBackpacks = {
};
_countFreeSlots = {
- private["_return"];
+ private ["_return"];
_return = [(_weaponsMax - _weapons), (_magazinesMax - _magazines), (_backpacksMax - _backpacks)];
_return;
};
_getControlText = {
- private["_control","_return"];
+ private ["_control","_return"];
disableSerialization;
_control = (findDisplay 106) displayCtrl 156;
_return = ctrlText _control;
@@ -45,7 +45,7 @@ _getControlText = {
};
_setControlText = {
- private["_control"];
+ private ["_control"];
disableSerialization;
_control = (findDisplay 106) displayCtrl 156;
_control ctrlSetText format["%1 (%2/%3/%4)", _objectName, _freeSlots select 0, _freeSlots select 1, _freeSlots select 2];
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_processHit.sqf b/@DayZRedux/Addons/dayz_code/compile/object_processHit.sqf
index 133fb38..94d94f4 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_processHit.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_processHit.sqf
@@ -1,4 +1,4 @@
-private["_unit","_selection","_damage","_strH","_dam","_total","_break","_display","_ctrlFracture","_id"];
+private ["_unit","_selection","_damage","_strH","_dam","_total","_break","_display","_ctrlFracture","_id"];
disableSerialization;
_unit = _this select 0;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_roadFlare.sqf b/@DayZRedux/Addons/dayz_code/compile/object_roadFlare.sqf
index b275c41..8fcf289 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_roadFlare.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_roadFlare.sqf
@@ -1,4 +1,4 @@
-private["_flare","_type","_sfx","_isLocal","_lightArea","_lightSpark","_color"];
+private ["_flare","_type","_sfx","_isLocal","_lightArea","_lightSpark","_color"];
_flare = _this select 0;
_type = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_setFixServer.sqf b/@DayZRedux/Addons/dayz_code/compile/object_setFixServer.sqf
index f767e1d..e8cdda1 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_setFixServer.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_setFixServer.sqf
@@ -1,10 +1,11 @@
-private["_unit","_selection","_damage","_strH"];
+private ["_unit","_selection","_damage","_strH"];
_unit = _this select 0;
_selection = _this select 1;
_damage = _this select 2;
-if (_selection != "" and local _unit) then {
+if (!isNil "_selection") then {
+if ((_selection != "") and (local _unit)) then {
_strH = "hit_" + (_selection);
_unit setHit[_selection,_damage];
//player sidechat str _damage;
@@ -24,4 +25,5 @@ if (_selection != "" and local _unit) then {
publicVariable "dayzUpdateVehicle";
};
};
+};
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_setHit.sqf b/@DayZRedux/Addons/dayz_code/compile/object_setHit.sqf
index 48f8ab0..895fbeb 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_setHit.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_setHit.sqf
@@ -1,4 +1,4 @@
-private["_unit","_selection","_strH","_dam"];
+private ["_unit","_selection","_strH","_dam"];
_unit = _this select 0;
_selection = _this select 1;
_damage = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_setHitLocal.sqf b/@DayZRedux/Addons/dayz_code/compile/object_setHitLocal.sqf
index 493e35e..c3e0aef 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_setHitLocal.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_setHitLocal.sqf
@@ -1,4 +1,4 @@
-private["_unit","_selection","_strH","_dam","_total"];
+private ["_unit","_selection","_strH","_dam","_total"];
_unit = _this select 0;
_selection = _this select 1;
_damage = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_setHitServer.sqf b/@DayZRedux/Addons/dayz_code/compile/object_setHitServer.sqf
index 48d53b1..8080129 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_setHitServer.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_setHitServer.sqf
@@ -1,4 +1,4 @@
-private["_unit","_selection","_damage","_strH","_dam","_total"];
+private ["_unit","_selection","_damage","_strH","_dam","_total"];
_unit = _this select 0;
_selection = _this select 1;
_damage = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_spawnDamVehicle.sqf b/@DayZRedux/Addons/dayz_code/compile/object_spawnDamVehicle.sqf
index b63b942..15691f1 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_spawnDamVehicle.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_spawnDamVehicle.sqf
@@ -1,4 +1,4 @@
-private["_car","_hitpoints","_dam","_selection","_type","_pos","_dir"];
+private ["_car","_hitpoints","_dam","_selection","_type","_pos","_dir"];
_type = _this select 0;
_pos = _this select 1;
_dir = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_speak.sqf b/@DayZRedux/Addons/dayz_code/compile/object_speak.sqf
index 2c95be3..2eb04ad 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_speak.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_speak.sqf
@@ -1,14 +1,30 @@
-private["_unit","_type","_chance","_rnd","_sound","_local","_dis"];
+
+private ["_unit","_type","_chance","_dis","_local","_num","_isWoman","_rnd","_sound"];
+
_unit = _this select 0;
_type = _this select 1;
_chance = _this select 2;
+_dis = switch true do {
+ case (count _this > 4): {_this select 4};
+ case (_type in ["shout","hit","attack","scream","breath","spotted"]): {100};
+ default {40};
+};
+
+_local = false;
+if (count _this > 3) then { _local = _this select 3; };
+if (!_local) then { // we override _local according to number of players inside _dis radius
+ _local = { _unit distance _x < _dis; } count playableUnits <= 1;
+};
+
+//diag_log(format["%1 dis:%2 local:%3", __FILE__, _dis, _local]);
+
_num = switch (_type) do {
- default {0};
+ default {0};
case "cough": {2};
case "chase": {14};
case "spotted": {13};
- case "hit": {6};
+ case "hit": {11}; // prev. 6
case "attack": {13};
case "idle": {35};
case "scream": {4};
@@ -21,31 +37,17 @@ _num = switch (_type) do {
case "dog_qq": {2};
};
-if (count _this > 4) then {
- _dis = _this select 4;
- _local = ({isPlayer _x} count (_unit nearEntities ["AllVehicles",_dis]) < 2);
-} else {
- _local = _this select 3;
-
- if (_type in ["shout","hit","attack","scream","breath","spotted"]) then {
- _dis = 100;
- } else {
- _dis = 60;
- };
-};
-
_isWoman = getText(configFile >> "cfgVehicles" >> (typeOf _unit) >> "TextPlural") == "Women";
if (_isWoman and (_type in ["scream","panic"])) then {
_type = _type + "_w";
};
-
-if ((round(random _chance) == _chance) or (_chance == 0)) then {
- _rnd =(round(random _num));
+if (floor(random(_chance)) == 0) then {
+ _rnd = floor(random(_num+1));
_sound = "z_" + _type + "_" + str(_rnd);
if (_local) then {
_unit say [_sound, _dis];
} else {
[nil,_unit,rSAY,[_sound, _dis]] call RE;
};
-};
\ No newline at end of file
+};
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_updatePosition.sqf b/@DayZRedux/Addons/dayz_code/compile/object_updatePosition.sqf
index 23136e8..5e7990f 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_updatePosition.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_updatePosition.sqf
@@ -1,4 +1,4 @@
-private["_object","_updateObj"];
+private ["_object","_updateObj"];
//check if can pitch here
_object = _this;
diff --git a/@DayZRedux/Addons/dayz_code/compile/object_vehicleKilled.sqf b/@DayZRedux/Addons/dayz_code/compile/object_vehicleKilled.sqf
index e83d2b9..ff7590b 100644
--- a/@DayZRedux/Addons/dayz_code/compile/object_vehicleKilled.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/object_vehicleKilled.sqf
@@ -1,4 +1,4 @@
-private["_unit","_killer","_type","_pos","_dir"];
+private ["_unit","_killer","_type","_pos","_dir"];
_unit = _this select 0;
_killer = _this select 1;
_type = typeOf _unit;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_alertZombies.sqf b/@DayZRedux/Addons/dayz_code/compile/player_alertZombies.sqf
index 7475364..a6f3653 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_alertZombies.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_alertZombies.sqf
@@ -1,4 +1,4 @@
-private["_unit","_distance","_doRun","_pos","_listTalk","_target","_targets","_multiplier"];
+private ["_unit","_distance","_doRun","_pos","_listTalk","_target","_targets","_multiplier"];
//Alert Zed's to noise of shot
_unit = _this select 0;
_distance = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_animalCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/player_animalCheck.sqf
index f96eaff..9e1ed5c 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_animalCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_animalCheck.sqf
@@ -1,4 +1,4 @@
-private["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones","_GroupMarker","_agent","_id","_tame"];
+private ["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones","_GroupMarker","_agent","_id","_tame"];
_list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
if (count _list < dayz_maxAnimals) then {
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_checkStealth.sqf b/@DayZRedux/Addons/dayz_code/compile/player_checkStealth.sqf
index 92aaf6e..2cae8be 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_checkStealth.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_checkStealth.sqf
@@ -1,4 +1,4 @@
-private["_vel","_speed","_scalePose","_scaleMvmt","_scaleLight","_scaleAlert","_anim","_anim4","_initial","_isDay","_nearFlare","_scaler","_pos"];
+private ["_vel","_speed","_scalePose","_scaleMvmt","_scaleLight","_scaleAlert","_anim","_anim4","_initial","_isDay","_nearFlare","_scaler","_pos"];
_vel = velocity (vehicle player);
_speed = (_vel distance [0,0,0]);
_pos = getPosATL player;
@@ -16,7 +16,7 @@ _anim4 = toString _anim4;
if (["pknl",_anim] call fnc_inString) then {
_scaleMvmt = 0.2; //0.1;
_scalePose = 0.6; //0.4
-} else {;
+} else {
if (["ppne",_anim] call fnc_inString) then {
_scaleMvmt = 0.3;
_scalePose = 0.14;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_chloroformed.sqf b/@DayZRedux/Addons/dayz_code/compile/player_chloroformed.sqf
index 8bcf447..0bcf52e 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_chloroformed.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_chloroformed.sqf
@@ -1,4 +1,4 @@
-private["_body","_duration"];
+private ["_body","_duration"];
_body = _this select 0;
_duration = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_combatLogged.sqf b/@DayZRedux/Addons/dayz_code/compile/player_combatLogged.sqf
index 59f8a4f..1f19524 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_combatLogged.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_combatLogged.sqf
@@ -1,4 +1,4 @@
-private["_playerName","_center","_group"];
+private ["_playerName","_center","_group"];
_playerName = _this;
//cutText [format["%1 has combat logged!",_playerName], "PLAIN DOWN"];
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_crossbowBolt.sqf b/@DayZRedux/Addons/dayz_code/compile/player_crossbowBolt.sqf
index 6a14a59..488dc4a 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_crossbowBolt.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_crossbowBolt.sqf
@@ -1,5 +1,5 @@
-private["_obj","_unit","_ammo","_magazine","_mags","_newmags","_distance","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr"];
-_obj = _this select 0;
+private ["_obj","_unit","_ammo","_magazine","_mags","_newmags","_distance","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr"];
+_obj = _this;
_unit = _obj select 0;
_weapon = _obj select 1;
_ammo = _obj select 4;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_death.sqf b/@DayZRedux/Addons/dayz_code/compile/player_death.sqf
index c54ff15..bdcaca0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_death.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_death.sqf
@@ -1,16 +1,16 @@
-private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills"];
+private ["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_method","_body","_id","_canHitFree","_isBandit","_myGroup"];
if (deathHandled) exitWith {};
deathHandled = true;
//Death
-
_body = player;
_playerID = getPlayerUID player;
+disableUserInput true;
//Send Death Notice
//["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName]] call callRpcProcedure;
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName];
- publicVariable "dayzDeath";
+ publicVariableServer "dayzDeath";
//Send Killer Information
dayzKiller = dayz_myKiller;
@@ -70,6 +70,9 @@ if (count _array > 0) then {
};
};
};
+ if (isNil "_method") then {
+ _method = "natural causes";
+ };
_body setVariable ["deathType",_method,true];
};
@@ -80,14 +83,13 @@ terminate dayz_animalCheck;
terminate dayz_monitor1;
terminate dayz_medicalH;
terminate dayz_gui;
-terminate dayz_zedCheck;
+//terminate dayz_zedCheck;
terminate dayz_locationCheck;
-terminate dayz_combatCheck;
+//terminate dayz_combatCheck;
terminate dayz_spawnCheck;
//Reset (just in case)
//deleteVehicle dayz_playerTrigger;
-disableUserInput false;
r_player_dead = true;
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [4]; "dynamicBlur" ppEffectCommit 0.2;
@@ -125,7 +127,7 @@ dayz_combatTimer = 0;
_body setVariable["combattimeout", 0, true];
//["dayzFlies",player] call broadcastRpcCallAll;
-sleep 1;
+sleep 1.5;
1 cutRsc ["DeathScreenBG","BLACK OUT",1];
2 cutRsc ["DeathScreen1","BLACK OUT",1];
@@ -146,4 +148,5 @@ sleep 1;
playMusic "dayz_track_death_1";
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
-"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
\ No newline at end of file
+"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
+disableUserInput false;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_fired.sqf b/@DayZRedux/Addons/dayz_code/compile/player_fired.sqf
index 8dd86ca..ca71ca0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_fired.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_fired.sqf
@@ -1,4 +1,4 @@
-private["_unit","_ammo","_audible","_distance","_listTalk","_weapon"];
+private ["_unit","_ammo","_audible","_distance","_listTalk","_weapon"];
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
_unit = _this select 0;
_weapon = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_gearSet.sqf b/@DayZRedux/Addons/dayz_code/compile/player_gearSet.sqf
index e4d57ce..fd89d13 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_gearSet.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_gearSet.sqf
@@ -1,4 +1,4 @@
-private["_inventory","_wpns","_mags","_idc","_isOK","_val","_item","_x"];
+private ["_inventory","_wpns","_mags","_idc","_isOK","_val","_item","_x"];
_inventory = _this;
if (count _inventory > 0) then {
_wpns = _inventory select 0;
@@ -6,7 +6,7 @@ if (count _inventory > 0) then {
//Add inventory
{
- private["_item","_val"];
+ private ["_item","_val"];
//is it an array?
_idc = 109;
if (typeName _x == "ARRAY") then {
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_gearSync.sqf b/@DayZRedux/Addons/dayz_code/compile/player_gearSync.sqf
index 5c981dd..4ca8b40 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_gearSync.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_gearSync.sqf
@@ -13,7 +13,7 @@ _objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle",
} foreach _objects;
-private["_dialog","_magazineArray","_control","_item","_val","_max"];
+private ["_dialog","_magazineArray","_control","_item","_val","_max"];
disableSerialization;
_dialog = _this select 0;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_gearWatcher.sqf b/@DayZRedux/Addons/dayz_code/compile/player_gearWatcher.sqf
index 485845f..e990d96 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_gearWatcher.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_gearWatcher.sqf
@@ -1,4 +1,4 @@
-private["_dialog","_staticName","_ctrlGearOfUnit","_ctrlAvailItems","_numItems","_object"];
+private ["_dialog","_staticName","_ctrlGearOfUnit","_ctrlAvailItems","_numItems","_object"];
// There doesn't seem to be a way to determine what object's gear you're
// accessing through the Gear UI display. This is likely something only
@@ -16,7 +16,7 @@ _ctrlAvailItems = _display displayCtrl 105;
_staticName = "Gear of unit:";
-private["_curWep","_maxWep","_curMag","_maxMag","_curPck","_maxPck"];
+private ["_curWep","_maxWep","_curMag","_maxMag","_curPck","_maxPck"];
_curWep = count (getWeaponCargo _object);
_curMag = count (getMagazineCargo _object);
@@ -34,13 +34,13 @@ ctrlSetText _ctrlGearOfUnit format["%1 %2/%3 %4/%5 %6/%7", _staticName, _curWep,
// we're accessing (and therefores its limits).
_numItems = (lnbSize _ctrlAvailItems) select 0;
-private["_curWep","_curMag","_curVeh"];
+private ["_curWep","_curMag","_curVeh"];
_curWep = 0;
_curMag = 0;
_curVeh = 0;
for "_i" from 0 to (_numItems - 1) do {
- private["_itemType"];
+ private ["_itemType"];
_item = lnbData [_ctrlAvailItems,[_i,1]];
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_humanityChange.sqf b/@DayZRedux/Addons/dayz_code/compile/player_humanityChange.sqf
index 1fad0a0..b2e0912 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_humanityChange.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_humanityChange.sqf
@@ -1,4 +1,4 @@
-private["_object","_change","_humanity","_timeStart"];
+private ["_object","_change","_humanity","_timeStart"];
//Set Variables
_object = _this select 0;
_change = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_humanityMorph.sqf b/@DayZRedux/Addons/dayz_code/compile/player_humanityMorph.sqf
index b71bbe4..dbd6d4b 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_humanityMorph.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_humanityMorph.sqf
@@ -1,4 +1,4 @@
-private["_updates","_playerUID","_charID","_humanity","_worldspace","_model"];
+private ["_updates","_playerUID","_charID","_humanity","_worldspace","_model"];
_playerUID = _this select 0;
_charID = _this select 1;
_model = _this select 2;
@@ -23,6 +23,7 @@ _zombieKills = player getVariable ["zombieKills",0];
_headShots = player getVariable ["headShots",0];
_humanKills = player getVariable ["humanKills",0];
_banditKills = player getVariable ["banditKills",0];
+_isInCombat = player getVariable ["isincombat",0];
//Switch
_model call player_switchModel;
@@ -72,6 +73,7 @@ player setVariable["humanKills",_humanKills,true];
player setVariable["banditKills",_banditKills,true];
player setVariable["characterID",_charID,true];
player setVariable["worldspace",_worldspace,true];
+player setVariable["isincombat",_isInCombat,true];
//code for this on the server is missing
//["dayzPlayerMorph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_login.sqf b/@DayZRedux/Addons/dayz_code/compile/player_login.sqf
index da62e71..3bcb845 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_login.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_login.sqf
@@ -1,6 +1,6 @@
-private["_unit","_move","_damage","_wound","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle"];
+private ["_unit","_move","_damage","_wound","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle"];
_unit = _this select 0;
_detail = _this select 1;
-if(_unit == getPlayerUID player) then {
+if (_unit == getPlayerUID player) then {
player setVariable["publish",_detail];
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_music.sqf b/@DayZRedux/Addons/dayz_code/compile/player_music.sqf
index c0ac6ea..136dda2 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_music.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_music.sqf
@@ -1,4 +1,4 @@
-private["_zombie","_type","_chance","_rnd","_sound"];
+private ["_zombie","_type","_chance","_rnd","_sound"];
while {!r_player_dead} do {
_num = round(random 35);
_sound = "z_suspense_" + str(_num);
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_onPause.sqf b/@DayZRedux/Addons/dayz_code/compile/player_onPause.sqf
index 55ca4b6..f771142 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_onPause.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_onPause.sqf
@@ -1,4 +1,4 @@
-private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead","_isInCombat"];
+private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
disableSerialization;
canAbort = false;
waitUntil {
@@ -13,10 +13,15 @@ private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead","_i
_timeMax = 30;
dayz_lastCheckSave = time;
- _isInCombat = player getVariable["isincombat", 0];
+ //_isInCombat = player getVariable["isincombat", 0];
- if(r_player_dead) exitWith {_btnAbort ctrlEnable true; canAbort = true;};
- if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true; _btnAbort ctrlEnable true; canAbort = true;};
+ if (r_player_dead) exitWith {_btnAbort ctrlEnable true; canAbort = true;};
+
+ if (r_fracture_legs) exitWith {_btnRespawn ctrlEnable true;
+ if (!((dayz_combatTimer > 0) || (player getVariable["combattimeout", 0] >= time) || (player getVariable["isincombat", 0] == 1))) then {
+ _btnAbort ctrlEnable true; canAbort = true;
+ };
+ };
//force gear save
if (time - dayz_lastCheckSave > 10) then {
@@ -30,7 +35,7 @@ private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead","_i
_btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"];
};
- case ((dayz_combatTimer > 0) || (player getVariable["combattimeout", 0] >= time) || (_isInCombat == 1)) : {
+ case ((dayz_combatTimer > 0) || (player getVariable["combattimeout", 0] >= time) || (player getVariable["isincombat", 0] == 1)) : {
canAbort = false;
_btnAbort ctrlEnable false;
cutText [localize "str_abort_playerincombat", "PLAIN DOWN"];
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_packTent.sqf b/@DayZRedux/Addons/dayz_code/compile/player_packTent.sqf
index 95a7668..b30b244 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_packTent.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_packTent.sqf
@@ -1,7 +1,7 @@
/*
[_obj] spawn player_packTent;
*/
-private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
+private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
_obj = _this;
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
@@ -11,7 +11,7 @@ player playActionNow "Medic";
player removeAction s_player_packtent;
s_player_packtent = -1;
-if(_ownerID == dayz_characterID) then {
+if (_ownerID == dayz_characterID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText [format[(localize "str_player_beingpacked")] , "PLAIN DOWN"]};
@@ -41,7 +41,7 @@ if(_ownerID == dayz_characterID) then {
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
- publicVariable "dayzDeleteObj";
+ publicVariableServer "dayzDeleteObj";
if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_projectileNear.sqf b/@DayZRedux/Addons/dayz_code/compile/player_projectileNear.sqf
index c0c2861..4a721f6 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_projectileNear.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_projectileNear.sqf
@@ -1,4 +1,4 @@
-private["_unit","_ammo","_audible","_distance","_listTalk","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr","_nearplayer","_playerName","_playerPos","_listNear"];
+private ["_unit","_ammo","_audible","_distance","_listTalk","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr","_nearplayer","_playerName","_playerPos","_listNear"];
_unit = _this select 0;
_weapon = _this select 1;
_ammo = _this select 4;
@@ -10,7 +10,7 @@ _projectile = _this select 6;
// being tracked for use in placing others in combat. This should hopefully result
// in increased performance, especially when people are firing off LMGs.
_timeleft = dayz_combatTimer - time;
-if (_timeleft > 43) exitWith{};
+if (_timeleft > 43) exitWith {};
//diag_log("COMBAT: Doing projectileNear calculations");
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_retrieveBox.sqf b/@DayZRedux/Addons/dayz_code/compile/player_retrieveBox.sqf
index 5349798..854acdd 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_retrieveBox.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_retrieveBox.sqf
@@ -1,7 +1,7 @@
/*
[_obj] spawn player_retrieveBox;
*/
-private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
+private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
_obj = _this;
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
@@ -11,7 +11,7 @@ player playActionNow "Medic";
player removeAction s_player_retrievebox;
s_player_retrievebox = -1;
-if(_ownerID == dayz_characterID) then {
+if (_ownerID == dayz_characterID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText [format[(localize "str_player_beingretrieved")] , "PLAIN DOWN"]};
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_serverModelChange.sqf b/@DayZRedux/Addons/dayz_code/compile/player_serverModelChange.sqf
index da2b3dd..d2a2a57 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_serverModelChange.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_serverModelChange.sqf
@@ -1,4 +1,4 @@
-private["_int","_newModel","_wait","_playerID","_playerObj","_randomSpot","_publishTo","_primary","_secondary","_key","_result","_charID","_playerObj","_playerName","_finished","_spawnPos","_spawnDir","_items","_counter","_magazines","_weapons","_group","_backpack","_worldspace","_direction","_newUnit","_score","_position","_isNew","_inventory","_backpack","_medical","_survival","_stats","_state"];
+private ["_int","_newModel","_wait","_playerID","_playerObj","_randomSpot","_publishTo","_primary","_secondary","_key","_result","_charID","_playerObj","_playerName","_finished","_spawnPos","_spawnDir","_items","_counter","_magazines","_weapons","_group","_backpack","_worldspace","_direction","_newUnit","_score","_position","_isNew","_inventory","_backpack","_medical","_survival","_stats","_state"];
//Set Variables
_playerID = _this select 0;
_playerObj = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_spawnCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/player_spawnCheck.sqf
index 915c7ec..ddedbf0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_spawnCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_spawnCheck.sqf
@@ -1,4 +1,4 @@
-private["_type","_isAir","_inVehicle","_dateNow","_maxZombies","_maxWildZombies","_age","_nearbyBuildings","_radius","_locationstypes","_nearestCity","_position","_nearbytype"];
+private ["_type","_isAir","_inVehicle","_zombied","_dateNow","_maxZombies","_maxWildZombies","_age","_nearbyBuildings","_radius","_locationstypes","_nearestCity","_position","_nearbytype"];
_type = _this select 0;
_Keepspawning = _this select 1;
_isAir = vehicle player iskindof "Air";
@@ -10,14 +10,14 @@ _age = -1;
_force = false;
_nearbyBuildings = [];
-_radius = 250;
+_radius = 250;
_position = getPosATL player;
if (_inVehicle) then {
_maxZombies = 10;
};
if (_isAir) then {
- _maxZombies = 10
+ _maxZombies = 10;
};
_players = _position nearEntities ["CAManBase",_radius+200];
@@ -101,11 +101,12 @@ if (dayz_spawnZombies == 0) then {
{
_type = typeOf _x;
_config = configFile >> "CfgBuildingLoot" >> _type;
- //_canLoot = isClass (_config);
+ _canLoot = isClass (_config);
_dis = _x distance player;
_checkLoot = ((count (getArray (_config >> "lootPos"))) > 0);
- _canLoot = ((count (getArray (_config >> "lootPos"))) > 0);
- if (_canLoot) then {
+ //_canLoot = ((count (getArray (_config >> "lootPos"))) > 0);
+ _x setVariable ["cleared",false,true];
+ if (_canLoot) then {
_keepAwayDist = ((sizeOf _type)+5);
_isNoone = {isPlayer _x} count (_x nearEntities ["CAManBase",_keepAwayDist]) == 0;
@@ -114,39 +115,20 @@ if (dayz_spawnZombies == 0) then {
_cleared = (_x getVariable ["cleared",true]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _looted) * 525948;
+ if (_age < -0.1) then {
+ _x setVariable ["looted",(DateToNumber date),true];
+ } else {
if (_age > 9) then {
_x setVariable ["looted",_dateNow,true];
dayz_lootWait = time;
- _handle = [_x] spawn building_spawnLoot;
- waitUntil{scriptDone _handle};
+ _qty = _x call building_spawnLoot;
+ //_currentWeaponHolders = _currentWeaponHolders + _qty;
+ //_handle = [_x] spawn building_spawnLoot;
+ //waitUntil{scriptDone _handle};
+ };
};
};
};
-
- //Loot NEW
- /*
- if ((_dis < 120) and (_dis > 30) and _canLoot and !_inVehicle and _checkLoot) then {
- _looted = (_x getVariable ["looted",-0.1]);
- _cleared = (_x getVariable ["cleared",true]);
- _dateNow = (DateToNumber date);
- _age = (_dateNow - _looted) * 525948;
-
- //diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
- if ((_age > 9) and (!_cleared)) then {
- _nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
- {deleteVehicle _x} forEach _nearByObj;
- _x setVariable ["cleared",true,true];
- _x setVariable ["looted",_dateNow,true];
- };
- if ((_age > 5) and (_cleared)) then {
- //Register
- _x setVariable ["looted",_dateNow,true];
- //cleanup
- _handle = [_x] spawn building_spawnLoot;
- waitUntil{scriptDone _handle};
- };
- };
-*/
//Zeds
if ((((time - dayz_spawnWait) > dayz_spawnDelay) or _force)) then {
if (dayz_CurrentZombies < dayz_maxGlobalZombies) then {
@@ -154,6 +136,13 @@ if (dayz_spawnZombies == 0) then {
//[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);
+ if (isNil "_zombied") then {
+ _x setVariable ["zombieSpawn",_dateNow,true];
+ _zombied = (_x getVariable ["zombieSpawn",-0.1]);
+ if (isNil "_zombied") then {
+ _zombied = _dateNow;
+ };
+ }; //Lazy fix for possible errors
_age = (_dateNow - _zombied) * 525948;
if (_age > 3) then {
_x setVariable ["zombieSpawn",_dateNow,true];
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_spawnlootCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/player_spawnlootCheck.sqf
index 3af6518..d20b49b 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_spawnlootCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_spawnlootCheck.sqf
@@ -1,4 +1,4 @@
-private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_nearbyBuildings","_nearby","_type","_config","_canZombie","_canLoot","_dis","_keepAwayDist","_isNoone","_looted","_cleared"];//_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings
+private ["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_nearbyBuildings","_nearby","_type","_config","_canZombie","_canLoot","_dis","_keepAwayDist","_isNoone","_looted","_cleared"];//_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings
_radius = _this select 0;
_position = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_spawnzedCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/player_spawnzedCheck.sqf
index c77d386..87f6bfb 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_spawnzedCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_spawnzedCheck.sqf
@@ -1,4 +1,4 @@
-private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_maxZombies","_nearby","_maxWildZombies","_tooManyZs","_tooManyWildZs","_type","_config","_canZombie","_dis","_zombied","_bPos","_zombiesNum","_withinRange","_spawnWildZs"];
+private ["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_maxZombies","_nearby","_maxWildZombies","_tooManyZs","_tooManyWildZs","_type","_config","_canZombie","_dis","_zombied","_bPos","_zombiesNum","_withinRange","_spawnWildZs"];
_radius = _this select 0;
_position = _this select 1;
@@ -16,4 +16,4 @@ _age = (_dateNow - _zombied) * 525948;
if (_age > 1) then {
_x setVariable ["zombieSpawn",_dateNow,true];
[_x] call building_spawnZombies;
-};
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_switchModel.sqf b/@DayZRedux/Addons/dayz_code/compile/player_switchModel.sqf
index 3428d79..38d6412 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_switchModel.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_switchModel.sqf
@@ -1,4 +1,4 @@
-private["_class","_position","_dir","_group","_oldUnit","_newUnit","_currentWpn","_muzzles","_currentAnim","_currentCamera"];
+private ["_class","_position","_dir","_group","_oldUnit","_newUnit","_currentWpn","_muzzles","_currentAnim"];
_class = _this;
_position = getPosATL player;
@@ -34,15 +34,15 @@ private ["_weapons","_magazines","_primweapon","_secweapon"];
_secweapon = secondaryWeapon player;
//Checks
- if(!(_primweapon in _weapons) && _primweapon != "") then {
+ if (!(_primweapon in _weapons) && _primweapon != "") then {
_weapons = _weapons + [_primweapon];
};
- if(!(_secweapon in _weapons) && _secweapon != "") then {
+ if (!(_secweapon in _weapons) && _secweapon != "") then {
_weapons = _weapons + [_secweapon];
};
-// if(count _magazines == 0) then {
+// if (count _magazines == 0) then {
// _magazines = magazines player;
// };
@@ -50,7 +50,7 @@ private ["_weapons","_magazines","_primweapon","_secweapon"];
private ["_newBackpackType","_backpackWpn","_backpackMag"];
dayz_myBackpack = unitBackpack player;
_newBackpackType = (typeOf dayz_myBackpack);
- if(_newBackpackType != "") then {
+ if (_newBackpackType != "") then {
_backpackWpn = getWeaponCargo unitBackpack player;
_backpackMag = getMagazineCargo unitBackpack player;
};
@@ -106,7 +106,7 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
} forEach _weapons;
//Check and Compare it
- if(str(_weapons) != str(weapons _newUnit)) then {
+ if (str(_weapons) != str(weapons _newUnit)) then {
//Get Differecnce
{
_weapons = _weapons - [_x];
@@ -119,11 +119,11 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
} forEach _weapons;
};
- if(_primweapon != (primaryWeapon _newUnit)) then {
+ if (_primweapon != (primaryWeapon _newUnit)) then {
_newUnit addWeapon _primweapon;
};
- if(_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then {
+ if (_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then {
_newUnit addWeapon _secweapon;
};
@@ -183,14 +183,14 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
//Move player inside
// player switchCamera = _currentCamera;
- if(_currentWpn != "") then {_newUnit selectWeapon _currentWpn;};
+ if (_currentWpn != "") then {_newUnit selectWeapon _currentWpn;};
[objNull, player, rSwitchMove,_currentAnim] call RE;
//dayz_originalPlayer attachTo [_newUnit];
player disableConversation true;
player setVariable ["bodyName",dayz_playerName,true];
- _playerUID=getPlayerUID player;
+ _playerUID = getPlayerUID player;
_playerObjName = format["player%1",_playerUID];
call compile format["%1 = player;",_playerObjName];
publicVariable _playerObjName;
@@ -201,3 +201,4 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
{player reveal _x} forEach (nearestObjects [getPosATL player, ["AllVehicles","WeaponHolder","Land_Cont_RX","Land_Cont2_RX","Land_Mag_RX","BuiltItems"], 75]);
//diag_log("DIAG: switchmodel allowdamage true");
player allowDamage true;
+ call dayz_forceSave;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_taskHint.sqf b/@DayZRedux/Addons/dayz_code/compile/player_taskHint.sqf
index 1705653..58639f6 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_taskHint.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_taskHint.sqf
@@ -3,7 +3,7 @@
#define GREEN [0.6,0.8,0.4,1]
#define RED [1,0.1,0,1]
-private["_task", "_taskDescription", "_taskStatus", "_taskParams"];
+private ["_task", "_taskDescription", "_taskStatus", "_taskParams"];
_task = _this select 0;
_taskDescription = (taskDescription _task) select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_throwObject.sqf b/@DayZRedux/Addons/dayz_code/compile/player_throwObject.sqf
index f9a06cf..276e854 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_throwObject.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_throwObject.sqf
@@ -1,5 +1,5 @@
-private["_obj","_unit","_ammo","_distance","_weapon","_projectile","_endPos","_doWait"];
-_obj = _this select 0;
+private ["_obj","_unit","_ammo","_distance","_weapon","_projectile","_endPos","_doWait"];
+_obj = _this;
_unit = _obj select 0;
_weapon = _obj select 1;
_ammo = _obj select 4;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_updateGui.sqf b/@DayZRedux/Addons/dayz_code/compile/player_updateGui.sqf
index 3bbca9e..1d81f0a 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_updateGui.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_updateGui.sqf
@@ -1,4 +1,4 @@
-private["_debug","_charPos","_nearDebug","_nearSpawnPos","_gycolorS","_gycolorB","_gxcolorS","_gxcolorB","_ycolorS","_ycolorB","_xcolorS","_xcolorB","_xCoord","_yCoord","_display","_ctrlBlood","_bloodVal","_ctrlFood","_ctrlThirst","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array"];
+private ["_debug","_charPos","_nearDebug","_nearSpawnPos","_gycolorS","_gycolorB","_gxcolorS","_gxcolorB","_ycolorS","_ycolorB","_xcolorS","_xcolorB","_xCoord","_yCoord","_display","_ctrlBlood","_bloodVal","_ctrlFood","_ctrlThirst","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array"];
disableSerialization;
_foodVal = 1 - (dayz_hunger / SleepFood);
@@ -76,7 +76,7 @@ _ctrlCombat ctrlSetTextColor[(Dayz_GUI_R + (0.2 * (1-_combatVal))),(Dayz_GUI_G *
/*
_humanity = player getVariable["humanity",0];
_guiHumanity = 0;
-if(_humanity != dayz_lastHumanity) then {
+if (_humanity != dayz_lastHumanity) then {
if (_humanity > 0) then {
_humanity = _humanity min 5000;
_guiHumanity = (round((_humanity / 5000) * 5) + 5);
@@ -167,7 +167,7 @@ if (r_player_inpain) then {
};
-//private["_debug","_charPos","_nearDebug","_nearSpawnPos","_xCoord","_yCoord"];
+//private ["_debug","_charPos","_nearDebug","_nearSpawnPos","_xCoord","_yCoord"];
//Debug Warning
_debug = getMarkerpos "respawn_west";
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_weaponCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/player_weaponCheck.sqf
index caaca2c..078f8b1 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_weaponCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_weaponCheck.sqf
@@ -1,4 +1,4 @@
-private["_currentObjects","_newObjects","_checkObjects"];
+private ["_currentObjects","_newObjects","_checkObjects"];
//_newObjects = [_previous,weapons player] call player_weaponCheck;
_currentObjects = _this select 0;
_checkObjects = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_weaponFiredNear.sqf b/@DayZRedux/Addons/dayz_code/compile/player_weaponFiredNear.sqf
index 3322351..7ef86f0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_weaponFiredNear.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_weaponFiredNear.sqf
@@ -1,5 +1,5 @@
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
-private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","_result","_evType","_recordable","_inVehicle","_isPlayer","_isRocket","_dmgDistance","_isBallistic","_handled"];
+private ["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","_result","_evType","_recordable","_inVehicle","_isPlayer","_isRocket","_dmgDistance","_isBallistic","_handled"];
//Init
//[unit, firer, distance, weapon, muzzle, mode, ammo]
_unit = _this select 0;
@@ -33,8 +33,8 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
};
- if (_inVehicle) exitWith{};
- if (_firer == player) exitWith{};
+ if (_inVehicle) exitWith {};
+ if (_firer == player) exitWith {};
//Is in danger angle?
_turretDir = _firer weaponDirection _weapon;
@@ -62,7 +62,7 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
};
[_unit,4] call fnc_usec_damageUnconscious;
- } else {;
+ } else {
//Just Knocked out
[_unit,0.5] call fnc_usec_damageUnconscious;
};
@@ -78,6 +78,7 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
if ((_distance < 5) and !_handled) then {
1 call fnc_usec_bulletHit;
[20,45] call fnc_usec_pitchWhine; //Visual , Sound
+ [20,45] call fnc_usec_pitchWhine; //Visual , Sound
// Dead
if (_isPlayer) then {
_id = [] spawn player_death;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_zombieAttack.sqf b/@DayZRedux/Addons/dayz_code/compile/player_zombieAttack.sqf
index a976474..90e1ac0 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_zombieAttack.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_zombieAttack.sqf
@@ -1,4 +1,4 @@
-private["_unit","_targets","_openVehicles","_closedVehicles","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
+private ["_unit","_targets","_openVehicles","_closedVehicles","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
_unit = _this select 0;
_type = _this select 1;
_vehicle = (vehicle player);
@@ -22,9 +22,7 @@ _unit setDir _dir;
if (local _unit) then
{
_unit playMove _move;
-}
-else
-{
+} else {
[objNull,_unit,rPlayMove,_move] call RE;
};
@@ -37,10 +35,7 @@ if (_vehicle != player) then {
_wound = getText(configFile >> "cfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> _hp >> "name");
_damage = random 0.08;
_chance = round(random 12);
-
-if (_vehicle isKindOf "Helicopter") exitWith {};
-//Remove getting hit in helicopters since the zombies stand at the edge of the blades, not at the body
-
+
if ((_chance % 4) == 0) then {
_openVehicles = ["ATV_Base_EP1", "Motorcycle", "Bicycle"];
{
@@ -49,28 +44,33 @@ if (_vehicle isKindOf "Helicopter") exitWith {};
};
} forEach _openVehicles;
};
-
+
//Remove vehicles that are moving faster than 10KPH
_closedVehicles = ["Helicopter", "Car", "Truck"];
- if (_vehicle isKindOf _x) then {
- _lastpos = getPosATL (vehicle player);
- _lasttime = time;
- _curpos = getPosATL (vehicle player);
+ {
+ if (_vehicle isKindOf _x) then {
+ _lastpos = getPosATL (vehicle player);
+ _lasttime = time;
+ _curpos = getPosATL (vehicle player);
_curtime = time;
_distance = _lastpos distance _curpos;
_difftime = (_curtime - _lasttime) max 0.001;
_speed = _distance / _difftime;
_threshold = 10;
if (_speed > _threshold) exitWith {};
- } forEach _closedVehicles;
+ };
+ } forEach _closedVehicles;
+ _hitpoints = _vehicle call vehicle_getHitpoints;
if ((_wound == "Glass1") or (_wound == "Glass2") or (_wound == "Glass3") or (_wound == "Glass4") or (_wound == "Glass5") or (_wound == "Glass6")) then {
[_unit,"hit",4,false] call dayz_zombieSpeak;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
-
- //diag_log ("Hitpoints " +str(_wound) +str(_total));
+
+ {
+ if (["Glass",_x,false] call fnc_inString) then {
+ //diag_log ("Hitpoints " +str(_wound) +str(_total));
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
if (_total >= 1) then {
@@ -97,7 +97,9 @@ if (_vehicle isKindOf "Helicopter") exitWith {};
publicVariable "dayzHitV";
};
};
-} else {
+ } forEach _hitpoints;
+ };
+ } else {
//Did he hit?
//_currentAnim = animationState _unit;
//diag_log ("Animation state: " +(_currentAnim));
@@ -105,7 +107,7 @@ if (_vehicle isKindOf "Helicopter") exitWith {};
_attackanimations = ["zombiestandingattack1","zombiestandingattack2","zombiestandingattack3","zombiestandingattack4","zombiestandingattack5","zombiestandingattack6","zombiestandingattack7","zombiestandingattack8","zombiestandingattack9","zombiestandingattack10","zombiefeed1","zombiefeed2","zombiefeed3","zombiefeed4","zombiefeed5"];
if (((_unit distance player) <= 3) and ((animationState _unit) in _attackanimations)) then {
//check LOS
- private[];
+ private [];
_tPos = (getPosASL _vehicle);
_zPos = (getPosASL _unit);
_inAngle = [_zPos,(getdir _unit),50,_tPos] call fnc_inAngleSector;
diff --git a/@DayZRedux/Addons/dayz_code/compile/player_zombieCheck.sqf b/@DayZRedux/Addons/dayz_code/compile/player_zombieCheck.sqf
index de0f46b..daa792b 100644
--- a/@DayZRedux/Addons/dayz_code/compile/player_zombieCheck.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/player_zombieCheck.sqf
@@ -1,4 +1,4 @@
-private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_type","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"];
+private ["_listTalk","_isZombie","_group","_eyeDir","_attacked","_type","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"];
_refObj = vehicle player;
_listTalk = (getPos _refObj) nearEntities ["zZambie_Base",200];
_pHeight = (getPosATL _refObj) select 2;
@@ -10,10 +10,9 @@ _attacked = false;
{
_continue = true;
_type = "zombie";
- _targets = _group getVariable ["targets",[]];
if (alive _x && _continue) then {
- private["_dist"];
+ private ["_dist"];
_dist = (_x distance _refObj);
_group = _x;
_targets = _group getVariable ["targets",[]];
diff --git a/@DayZRedux/Addons/dayz_code/compile/server_interface.sqf b/@DayZRedux/Addons/dayz_code/compile/server_interface.sqf
index 2f5d0b8..0e9e35a 100644
--- a/@DayZRedux/Addons/dayz_code/compile/server_interface.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/server_interface.sqf
@@ -6,14 +6,14 @@ _data = _this select 0;
_action = _this select 1;
debuglog _action;
-if(typeName(_data select 0) == "DISPLAY")then
+if (typeName(_data select 0) == "DISPLAY") then
{
_display = (_data select 0);
};
_lbindex = 0;
_lbselected = "";
-if(typeName(_data select 0) == "CONTROL")then
+if (typeName(_data select 0) == "CONTROL") then
{
_control = (_data select 0);
_display = ctrlParent _control;
diff --git a/@DayZRedux/Addons/dayz_code/compile/server_updatePlayer.sqf b/@DayZRedux/Addons/dayz_code/compile/server_updatePlayer.sqf
index 1771593..cc9856e 100644
--- a/@DayZRedux/Addons/dayz_code/compile/server_updatePlayer.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/server_updatePlayer.sqf
@@ -1,4 +1,4 @@
-private["_characterID","_currentModelCheck","_temp","_isSync","_currentWpn","_currentMag","_magazines","_qty","_qtyT","_val","_isNewPos","_isNewBackp","_humanity","_isNewGear","_doUpdate","_currentModel","_modelChk","_playerPos","_playerGear","_playerBackp","_backpack","_updates","_killsB","_killsH","_medical","_isNewMed","_character","_timeSince","_charPos","_isInVehicle","_justAte","_justDrank","_distanceFoot","_lastPos","_legs","_arms","_kills","_headShots","_killsCHK","_headShotsCHK","_timeGross","_timeLeft","_onLadder","_isTerminal"];
+private ["_characterID","_currentModelCheck","_temp","_isSync","_currentWpn","_currentMag","_magazines","_qty","_qtyT","_val","_isNewPos","_isNewBackp","_humanity","_isNewGear","_doUpdate","_currentModel","_modelChk","_playerPos","_playerGear","_playerBackp","_backpack","_updates","_killsB","_killsH","_medical","_isNewMed","_character","_timeSince","_charPos","_isInVehicle","_justAte","_justDrank","_distanceFoot","_lastPos","_legs","_arms","_kills","_headShots","_killsCHK","_headShotsCHK","_timeGross","_timeLeft","_onLadder","_isTerminal"];
_character = _this;
_doUpdate = false;
_characterID = _character getVariable ["characterID","0"];
diff --git a/@DayZRedux/Addons/dayz_code/compile/set_obj_dmg.sqf b/@DayZRedux/Addons/dayz_code/compile/set_obj_dmg.sqf
index 8a46d80..55877fc 100644
--- a/@DayZRedux/Addons/dayz_code/compile/set_obj_dmg.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/set_obj_dmg.sqf
@@ -3,7 +3,7 @@ ASSIGN DAMAGE TO A UNIT
- Function set_obj_dmg
- [unit, selectionName, damage, source, projectile] call set_obj_dmg;
************************************************************/
-private["_unit","_selection","_strH","_dam","_total","_damage"];
+private ["_unit","_selection","_strH","_dam","_total","_damage"];
_unit = _this select 0;
_selection = _this select 1;
_total = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/spawn_flies.sqf b/@DayZRedux/Addons/dayz_code/compile/spawn_flies.sqf
index 641ca1c..83de689 100644
--- a/@DayZRedux/Addons/dayz_code/compile/spawn_flies.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/spawn_flies.sqf
@@ -1,6 +1,8 @@
-private["_body","_id","_position"];
+private ["_body","_id","_position"];
_body = _this;
_position = getPosATL _body;
_id = [_position,0.1,1.5] call bis_fnc_flies;
+//_flies = nearestObject [_position,"Sound_Flies"];
+//_flies attachTo [_body];
//_id setVariable ["body",_body];
//dayz_flyMonitor set[count dayz_flyMonitor, _id];
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/spawn_loot.sqf b/@DayZRedux/Addons/dayz_code/compile/spawn_loot.sqf
index 04d919f..8ea2f80 100644
--- a/@DayZRedux/Addons/dayz_code/compile/spawn_loot.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/spawn_loot.sqf
@@ -1,36 +1,46 @@
-private["_itemType","_iPos","_indexLootSpawn","_iArray","_iItem","_iClass","_item","_qty","_max","_tQty","_arrayLootSpawn","_canType"];
-// [_itemType,_weights]
+private ["_iItem","_iClass","_iPos","_radius","_iPosZ","_item","_itemTypes","_qty","_max","_index","_weights","_cntWeights","_tQty","_canType","_mags","_magQty","_uniq"];
+
_iItem = _this select 0;
_iClass = _this select 1;
-_iPos = _this select 2;
+_iPos = _this select 2;
_radius = _this select 3;
-_type = _this select 4;
+_uniq = ["ItemWaterbottle", "ItemWaterbottleUnfilled"];
_iPosZ = _iPos select 2;
-if( _iPosZ < 0 ) then { _iPos = [_iPos select 0,_iPos select 1,0]; };
+if ((isNil "_iPosZ") OR {( _iPosZ < 0)}) then { _iPos = [_iPos select 0,_iPos select 1,0]; };
switch (_iClass) do {
default {
//Item is food, add random quantity of cans along with an item (if exists)
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
+ /*
+ _itemTypes = [];
+ {
+ _itemTypes set [count _itemTypes, _x select 0]
+ } foreach getArray (configFile >> "cfgLoot" >> _iClass);
+ */
_arrayLootSpawn = [] + getArray (configFile >> "cfgLoot" >> _iClass);
- _itemType = _arrayLootSpawn select 0;
- _weights = _arrayLootSpawn call fnc_buildWeightedArray;
+ _itemTypes = _arrayLootSpawn select 0;
_qty = 0;
_max = ceil(random 2) + 1;
- //diag_log ("LOOTSPAWN: QTY: " + str(_max) + " ARRAY: " + str(_arrayLootSpawn));
while {_qty < _max} do {
- private["_tQty","_indexLootSpawn","_canType"];
- _tQty = floor(random 1) + 1;
- //diag_log ("LOOTSPAWN: ITEM QTY: " + str(_tQty));
-
- _indexLootSpawn = _weights call BIS_fnc_selectRandom;
- _canType = _itemType select _indexLootSpawn;
-
- //diag_log ("LOOTSPAWN: ITEM: " + str(_canType));
- _item addMagazineCargoGlobal [_canType,_tQty];
- _qty = _qty + _tQty;
- };
+ _index = dayz_CLBase find _iClass;
+ _weights = dayz_CLChances select _index;
+ _cntWeights = count _weights;
+ _index = floor(random _cntWeights);
+ _index = _weights select _index;
+ _canType = _itemTypes select _index;
+ _tQty = round(random 1) + 1;
+ if (_canType in _uniq) then {
+ _tQty = if (({_x in _uniq} count magazines _item) == 0) then {1} else {0};
+ if (_tQty == 0) then {diag_log(format["%1 Prevent any duplicate member %2 from family %3",__FILE__, _canType, _uniq]);};
+ //diag_log(format["%1 %2 DUP? type:%3 mag:%4 _this:%5",__FILE__, __LINE__, _canType, magazines _item, _this]);
+ };
+ if (_tQty > 0) then {
+ _item addMagazineCargoGlobal [_canType,_tQty];
+ _qty = _qty + _tQty;
+ };
+ };
if (_iItem != "") then {
_conf = configFile >> "cfgWeapons" >> _iItem;
if (isClass _conf) then {
@@ -64,11 +74,6 @@ switch (_iClass) do {
_item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
};
};
-
-//diag_log(format["Spawned: %1 (%2) - %3 ",_iItem,_iClass,_type]);
-_dateNow = (DateToNumber date);
-_item setVariable ["looted",_dateNow,true];
-
if ((count _iPos) > 2) then {
- _item setPosATL _ipos;
+ _item setPosATL _iPos;
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/compile/tame_dog.sqf b/@DayZRedux/Addons/dayz_code/compile/tame_dog.sqf
index e4c399a..a0662df 100644
--- a/@DayZRedux/Addons/dayz_code/compile/tame_dog.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/tame_dog.sqf
@@ -13,7 +13,7 @@
_dog = Intended target of the script.
*/
-private["_target", "_caller", "_id", "_dog", "_pos", "_fsmid"];
+private ["_target", "_caller", "_id", "_dog", "_pos", "_fsmid"];
_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/ui_changeDisplay.sqf b/@DayZRedux/Addons/dayz_code/compile/ui_changeDisplay.sqf
index b63bb54..3f8eaac 100644
--- a/@DayZRedux/Addons/dayz_code/compile/ui_changeDisplay.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/ui_changeDisplay.sqf
@@ -1,4 +1,4 @@
-private["_state"];
+private ["_state"];
disableSerialization;
_state = uiNamespace getVariable ['DZ_displayUI', 0];
diff --git a/@DayZRedux/Addons/dayz_code/compile/vehicle_handleDamage.sqf b/@DayZRedux/Addons/dayz_code/compile/vehicle_handleDamage.sqf
index dc3bcef..21b56e4 100644
--- a/@DayZRedux/Addons/dayz_code/compile/vehicle_handleDamage.sqf
+++ b/@DayZRedux/Addons/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","_damage","_needUpdate"];
_unit = _this select 0;
_selection = _this select 1;
_total = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/compile/vehicle_handleKilled.sqf b/@DayZRedux/Addons/dayz_code/compile/vehicle_handleKilled.sqf
index 11a95a6..d2c298c 100644
--- a/@DayZRedux/Addons/dayz_code/compile/vehicle_handleKilled.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/vehicle_handleKilled.sqf
@@ -1,4 +1,4 @@
-private["_unit","_hitPoints","_selection","_killer"];
+private ["_unit","_hitPoints","_selection","_killer"];
_unit = _this select 0;
_killer = _this select 1;
diff --git a/@DayZRedux/Addons/dayz_code/compile/vehicle_init.sqf b/@DayZRedux/Addons/dayz_code/compile/vehicle_init.sqf
index 96ddb30..7589d7b 100644
--- a/@DayZRedux/Addons/dayz_code/compile/vehicle_init.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/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"];
_unit = _this;
_dir = getdir _this;
_location = getPosATL _this;
diff --git a/@DayZRedux/Addons/dayz_code/compile/wild_spawnZombies.sqf b/@DayZRedux/Addons/dayz_code/compile/wild_spawnZombies.sqf
index 663f8a6..bed0ef6 100644
--- a/@DayZRedux/Addons/dayz_code/compile/wild_spawnZombies.sqf
+++ b/@DayZRedux/Addons/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","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
_player = _this select 0;
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
_doLoiter = true;
@@ -45,12 +45,12 @@ _agent setVariable ["newDest",_newDest];
//Add some loot
_rnd = random 1;
if (_rnd > 0.3) then {
- _lootType = configFile >> "CfgVehicles" >> _type >> "zombieLoot";
+ _lootType = configFile >> "CfgVehicles" >> _type >> "zombieLoot";
if (isText _lootType) then {
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
if (count _array > 0) then {
_loot = _array call BIS_fnc_selectRandomWeighted;
- if(!isNil "_array") then {
+ if (!isNil "_array") then {
_agent addMagazine _loot;
};
};
diff --git a/@DayZRedux/Addons/dayz_code/compile/zombie_findTarget.sqf b/@DayZRedux/Addons/dayz_code/compile/zombie_findTarget.sqf
index 1161096..2197ad4 100644
--- a/@DayZRedux/Addons/dayz_code/compile/zombie_findTarget.sqf
+++ b/@DayZRedux/Addons/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","_leadheight","_nearEnts","_rnd","_assigned"];
_group = _this;
_target = objNull;
_lead = leader _group;
@@ -14,7 +14,7 @@ _assigned = _group getVariable ["targets",[]];
//Find targets
_targets = _lead nearTargets _range;
{
- private["_obj","_dis"];
+ private ["_obj","_dis"];
_obj = _x select 4;
_dis = _obj distance _lead;
// if (_obj isKindOf "Man") then {
@@ -36,7 +36,7 @@ _targets = _lead nearTargets _range;
if (count _targetMen == 0) then {
_fires = nearestObjects [_lead,["Land_Fire","SmokeShell"],_range];
{
- private["_dis"];
+ private ["_dis"];
_dis = _x distance _lead;
if ((_dis < _range) and !(_x in _targetMen)) then {
_rnd = random 1;
@@ -56,7 +56,7 @@ if (count _targetMen > 0) then {
_manDis = _targetDis select 0;
_c = 0;
{
- private["_dis"];
+ private ["_dis"];
_dis = _targetDis select _c;
if (_dis < _manDis) then {
_man = _x;
diff --git a/@DayZRedux/Addons/dayz_code/compile/zombie_findTargetAgent.sqf b/@DayZRedux/Addons/dayz_code/compile/zombie_findTargetAgent.sqf
index d1b62a2..e959514 100644
--- a/@DayZRedux/Addons/dayz_code/compile/zombie_findTargetAgent.sqf
+++ b/@DayZRedux/Addons/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","_c","_man","_manDis","_targets","_agent","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"];
_agent = _this;
_target = objNull;
_targets = [];
@@ -14,7 +14,7 @@ if (isNil "_targets") exitWith {};
if (count _targets == 0) then {
_objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell"],50];
{
- private["_dis"];
+ private ["_dis"];
if (!(_x in _targets)) then {
_targets set [count _targets,_x];
_targetDis set [count _targetDis,_dis];
@@ -28,7 +28,7 @@ if (count _targets > 0) then
_man = _targets select 0;
_manDis = _man distance _agent;
{
- private["_dis"];
+ private ["_dis"];
_dis = _x distance _agent;
if (_dis < _manDis) then
{
diff --git a/@DayZRedux/Addons/dayz_code/compile/zombie_generate.sqf b/@DayZRedux/Addons/dayz_code/compile/zombie_generate.sqf
index 4407235..1753ae2 100644
--- a/@DayZRedux/Addons/dayz_code/compile/zombie_generate.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/zombie_generate.sqf
@@ -1,4 +1,4 @@
-private ["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_isAlive","_myDest","_newDest","_rnd","_lootType","_index","_weights","_loot_count"];
+private ["_position","_doLoiter","_distance","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_isAlive","_myDest","_newDest","_rnd","_lootType","_index","_weights","_loot_count"];
_position = _this select 0;
_doLoiter = _this select 1;
_unitTypes = _this select 2;
@@ -14,6 +14,9 @@ _agent = objNull;
//Exit if no one is nearby
if (!_isNoone) exitWith {};
+_distance = [_position, player] call BIS_fnc_distance2D;
+if (_distance < 10) exitWith {};
+
if (count _unitTypes == 0) then {
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
};
@@ -81,7 +84,7 @@ if (_rnd > 0.3) then {
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
if (count _array > 0) then {
_loot = _array call BIS_fnc_selectRandomWeighted;
- if(!isNil "_array") then {
+ if (!isNil "_array") then {
_agent addMagazine _loot;
};
};
diff --git a/@DayZRedux/Addons/dayz_code/compile/zombie_initialize.sqf b/@DayZRedux/Addons/dayz_code/compile/zombie_initialize.sqf
index 5866961..1b3cd9b 100644
--- a/@DayZRedux/Addons/dayz_code/compile/zombie_initialize.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/zombie_initialize.sqf
@@ -1,4 +1,4 @@
-private["_unit"];
+private ["_unit"];
_unit = _this select 0;
if (isServer) then {
_unit addEventHandler ["local", {_this call zombie_findOwner}];
diff --git a/@DayZRedux/Addons/dayz_code/compile/zombie_loiter.sqf b/@DayZRedux/Addons/dayz_code/compile/zombie_loiter.sqf
index 58b78c9..928ea9f 100644
--- a/@DayZRedux/Addons/dayz_code/compile/zombie_loiter.sqf
+++ b/@DayZRedux/Addons/dayz_code/compile/zombie_loiter.sqf
@@ -1,4 +1,4 @@
-private["_unit","_originalPos","_pos"];
+private ["_unit","_originalPos","_pos"];
_unit = _this select 0;
_originalPos = _this select 1;
_pos = getPosATL _unit;
@@ -24,7 +24,7 @@ if (count _this > 2) then {
};
};
-if(isNull group _unit) then {
+if (isNull group _unit) then {
_unit moveTo _pos;
} else {
_unit domove _pos;
diff --git a/@DayZRedux/Addons/dayz_code/config.cpp b/@DayZRedux/Addons/dayz_code/config.cpp
index 923889a..05fddea 100644
--- a/@DayZRedux/Addons/dayz_code/config.cpp
+++ b/@DayZRedux/Addons/dayz_code/config.cpp
@@ -5,7 +5,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
- requiredAddons[] = {"dayz_equip","dayz_weapons","CAMisc3","CABuildingParts","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT"};
+ requiredAddons[] = {"dayz_equip","dayz_weapons","CAMisc3","CABuildingParts","swm_misc","swm_swissarms","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT"};
};
class DZ_DebriefingRemoved
{
@@ -26,7 +26,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.dayzredux.com";
- version = "1.1.3";
+ version = "1.2.1";
hiveVersion = 0.96; //0.93
};
class DZ_InitWorld
@@ -89,8 +89,8 @@ class CfgInGameUI
{
cueColor[] = {0,0,0,0};
};
-
-
+
+
class MPTable
{
color[] = {0,0,0,0}; //{0.7,0.7,0.7,1};
@@ -102,7 +102,7 @@ class CfgInGameUI
colorCiv[] = {0,0,0,0}; //{0.8,0.8,0.8,1};
colorRes[] = {0,0,0,0}; //{0.7,0.7,0.95,1};
font = "EtelkaNarrowMediumPro";
- size = "0"; //"( 21 / 408 )";
+ size = "( 21 / 408 )"; //"( 21 / 408 )";
class Columns
{
class Order
diff --git a/@DayZRedux/Addons/dayz_code/external/DynamicWeatherEffects.sqf b/@DayZRedux/Addons/dayz_code/external/DynamicWeatherEffects.sqf
index 2dd5ea5..5a5d3b2 100644
--- a/@DayZRedux/Addons/dayz_code/external/DynamicWeatherEffects.sqf
+++ b/@DayZRedux/Addons/dayz_code/external/DynamicWeatherEffects.sqf
@@ -61,7 +61,7 @@ _minimumRain = 0;
// When raining, rain intensity never exceeds this value. Must be between 0 and 1 and greater than or equal to _minimumRain
// (0 = no rain, 1 = maximum rain intensity). (Suggested value: 0.8);
-_maximumRain = 0.8;
+_maximumRain = 0.5;
// Wind vector strength never falls below this value. Must be greater or equal to 0 and less than or equal to _maximumWind.
// (Suggested value: 0);
diff --git a/@DayZRedux/Addons/dayz_code/init/compiles.sqf b/@DayZRedux/Addons/dayz_code/init/compiles.sqf
index bbcd3ed..0dd94b1 100644
--- a/@DayZRedux/Addons/dayz_code/init/compiles.sqf
+++ b/@DayZRedux/Addons/dayz_code/init/compiles.sqf
@@ -110,28 +110,32 @@ if (!isDedicated) then {
// TODO: need move it in player_monitor.fsm
// allow player disconnect from server, if loading hang, kicked by BE etc.
[] spawn {
- private["_timeOut","_display","_control1","_control2"];
+ private ["_timeOut","_display","_control1","_control2"];
disableSerialization;
_timeOut = 0;
dayz_loadScreenMsg = "";
diag_log "DEBUG: loadscreen guard started.";
+ /*
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
+ */
// 40 sec timeout
while { _timeOut < 600 && !dayz_clientPreload } do {
- if ( isNull _display ) then {
+ /*
+ if (isNull _display) then {
waitUntil { !dialog; };
startLoadingScreen ["","RscDisplayLoadCustom"];
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
};
+ */
if ( dayz_loadScreenMsg != "" ) then {
- _control1 ctrlSetText dayz_loadScreenMsg;
+ //_control1 ctrlSetText dayz_loadScreenMsg;
dayz_loadScreenMsg = "";
};
- _control2 ctrlSetText format["%1",round(_timeOut*0.1)];
+ //_control2 ctrlSetText format["%1",round(_timeOut*0.1)];
_timeOut = _timeOut + 1;
sleep 0.1;
};
@@ -144,7 +148,7 @@ if (!isDedicated) then {
} else { diag_log "DEBUG: loadscreen guard ended."; };
};
dayz_losChance = {
- private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
+ private ["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
_agent = _this select 0;
_dis = _this select 1;
_maxDis = _this select 2;
@@ -157,7 +161,7 @@ if (!isDedicated) then {
};
ui_initDisplay = {
- private["_control","_ctrlBleed","_display","_ctrlFracture","_ctrlDogFood","_ctrlDogWater","_ctrlDogWaterBorder", "_ctrlDogFoodBorder"];
+ private ["_control","_ctrlBleed","_display","_ctrlFracture","_ctrlDogFood","_ctrlDogWater","_ctrlDogWaterBorder", "_ctrlDogFoodBorder"];
disableSerialization;
_display = uiNamespace getVariable 'DAYZ_GUI_display';
//_control = _display displayCtrl 1204;
@@ -182,7 +186,7 @@ if (!isDedicated) then {
};
dayz_losCheck = {
- private["_target","_agent","_cantSee"];
+ private ["_target","_agent","_cantSee"];
_target = _this select 0;
_agent = _this select 1;
_cantSee = true;
@@ -202,7 +206,7 @@ if (!isDedicated) then {
};
eh_zombieInit = {
- private["_unit","_pos"];
+ private ["_unit","_pos"];
//_unit = _this select 0;
//_pos = getPosATL _unit;
//_id = [_pos,_unit] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
@@ -227,6 +231,7 @@ if (!isDedicated) then {
private ["_dikCode", "_handled","_displayg"];
_dikCode = _this select 1;
_handled = false;
+ /*
if (_dikCode in (actionKeys "GetOver")) then {
if (!r_fracture_legs and (time - dayz_lastCheckBit > 4)) then {
_inBuilding = [player] call fnc_isInsideBuilding;
@@ -236,7 +241,11 @@ if (!isDedicated) then {
call player_CombatRoll;
};
};
- };
+ }; */
+ //Prevent exploit of drag body
+ if ((_dikCode in actionKeys "Prone") and r_drag_sqf) then { force_dropBody = true; };
+ if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) then { force_dropBody = true; };
+
if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
@@ -262,32 +271,20 @@ if (!isDedicated) then {
dayz_lastCheckBit = time;
call dayz_forceSave;
};
- if (_dikCode == 0xB8 or _dikCode == 0x38 or _dikCode == 0x3E) then { // or _dikCode == DIK_LMENU or _dikCode == DIK_RMENU
+ // R_ALT L_ALT F4 L_SHIFT R_SHIFT ESC
+ if (_dikCode == 0xB8 or _dikCode == 0x38 or _dikCode == 0x3E or _dikCode == 0x2A or _dikCode == 0x36 or _dikCode == 0x01) then {
_displayg = findDisplay 106;
if (!isNull _displayg) then {
- closeDialog 106;
- openMap false;
+ call player_gearSync;
call dayz_forceSave;
} else {
- /*
- for "_i" from 0 to 999 do {
- _displayi = findDisplay _i;
- if (_i == 46) then {_displayi = findDisplay 47;};
- closeDialog _i;
- _displayi closeDisplay 0;
- _displayi closeDisplay 1;
- _displayi closeDisplay 2;
- openMap false;
- };
- */
if (dialog) then {
+ call player_gearSync;
call dayz_forceSave;
};
};
};
- if (_dikCode == 0x01) then {
- call dayz_forceSave;
- };
+
_handled
};
@@ -311,7 +308,7 @@ if (!isDedicated) then {
};
player_serverModelChange = {
- private["_object","_model"];
+ private ["_object","_model"];
_object = _this select 0;
_model = _this select 1;
if (_object == player) then {
@@ -320,7 +317,7 @@ if (!isDedicated) then {
};
player_guiControlFlash = {
- private["_control"];
+ private ["_control"];
_control = _this;
if (ctrlShown _control) then {
_control ctrlShow false;
@@ -330,7 +327,7 @@ if (!isDedicated) then {
};
gear_ui_offMenu = {
- private["_control","_parent","_menu"];
+ private ["_control","_parent","_menu"];
disableSerialization;
_control = _this select 0;
_parent = findDisplay 106;
@@ -348,7 +345,7 @@ if (!isDedicated) then {
};
gear_ui_init = {
- private["_control","_parent","_menu","_dspl","_grpPos"];
+ private ["_control","_parent","_menu","_dspl","_grpPos"];
disableSerialization;
_parent = findDisplay 106;
_control = _parent displayCtrl 6902;
@@ -364,7 +361,7 @@ if (!isDedicated) then {
};
dayz_eyeDir = {
- private["_vval","_vdir"];
+ private ["_vval","_vdir"];
_vval = (eyeDirection _this);
_vdir = (_vval select 0) atan2 (_vval select 1);
if (_vdir < 0) then {_vdir = 360 + _vdir};
@@ -372,7 +369,7 @@ if (!isDedicated) then {
};
dayz_lowHumanity = {
- private["_unit","_humanity","_delay"];
+ private ["_unit","_humanity","_delay"];
_unit = _this;
if ((_unit distance player) < 15) then {
_humanity = _unit getVariable["humanity",0];
@@ -386,7 +383,7 @@ if (!isDedicated) then {
};
};
dayz_meleeMagazineCheck = {
- private["_meleeNum","_magType","_wpnType"];
+ private ["_meleeNum","_magType","_wpnType"];
_wpnType = primaryWeapon player;
_magType = ([] + getArray (configFile >> "CfgWeapons" >> _wpnType >> "magazines")) select 0;
_meleeNum = ({_x == _magType} count magazines player);
@@ -441,7 +438,7 @@ if (!isDedicated) then {
player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
player_sumMedical = {
- private["_character","_wounds","_legs","_arms","_medical"];
+ private ["_character","_wounds","_legs","_arms","_medical"];
_character = _this;
_wounds = [];
if (_character getVariable["USEC_injured",false]) then {
@@ -479,4 +476,4 @@ if (isServer) then {
//Start Dynamic Weather
execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";
- initialized = true;
+ initialized = true;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/init/loot_init.sqf b/@DayZRedux/Addons/dayz_code/init/loot_init.sqf
index 1088b37..b2de9ec 100644
--- a/@DayZRedux/Addons/dayz_code/init/loot_init.sqf
+++ b/@DayZRedux/Addons/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 ["_cfgCount","_config","_i","_itemChances","_itemCount","_weighted","_j","_weight","_l","_k","_type","_canZombie","_canLoot"];
dayz_CBLChances = [];
dayz_CBLBase = [];
@@ -13,14 +13,14 @@ for "_i" from 0 to ((count _config) - 1) do {
_j = 0;
for "_l" from 0 to ((count _itemChances) - 1) do {
_weight = round ((_itemChances select _l) * 100);
- for "_k" from 0 to _weight - 1 do {
+ for "_k" from 0 to (_weight - 1) do {
_weighted set [_j + _k, _l];
};
_j = _j + _weight;
};
dayz_CBLChances set [count dayz_CBLChances, _weighted];
dayz_CBLBase set [count dayz_CBLBase, _classname];
- } ;
+ };
} else {
dayz_CBLChances set [count dayz_CBLChances, [0]];
dayz_CBLBase set [count dayz_CBLBase, _classname];
@@ -31,34 +31,35 @@ dayz_CLChances = [];
dayz_CLBase = [];
_config = configFile >> "cfgLoot";
for "_i" from 0 to ((count (_config)) - 1) do {
+ _classname = configName (_config select _i);
_itemChances = (getArray (_config select _i)) select 1;
_weighted = [];
_j = 0;
for "_l" from 0 to ((count _itemChances) - 1) do {
_weight = round ((_itemChances select _l) * 100);
- for "_k" from 0 to _weight - 1 do {
+ for "_k" from 0 to (_weight - 1) do {
_weighted set [_j + _k, _l];
};
_j = _j + _weight;
};
- dayz_CLBase set [count dayz_CLBase, configName (_config select _i)];
- dayz_CLChances set [count dayz_CLChances, _weighted];
+ dayz_CLBase set [count dayz_CLBase, _classname];
+ dayz_CLChances set [count dayz_CLChances, _weighted];
};
-private["_i","_type","_config","_canZombie","_canLoot"];
+private ["_i","_type","_config","_canZombie","_canLoot"];
dayz_ZombieBuildings = [];
dayz_LootBuildings = [];
for "_i" from 0 to (count (configFile >> "CfgBuildingLoot") - 1) do {
_type = (configFile >> "CfgBuildingLoot") select _i;
_canZombie = getNumber (_type >> "zombieChance") > 0;
_canLoot = getNumber (_type >> "lootChance") > 0;
- if(_canZombie) then {
- if(!((configName _type) in dayz_ZombieBuildings)) then {
+ if (_canZombie) then {
+ if (!((configName _type) in dayz_ZombieBuildings)) then {
dayz_ZombieBuildings set [count dayz_ZombieBuildings, configName _type];
};
};
- if(_canLoot) then {
- if(!((configName _type) in dayz_LootBuildings)) then {
+ if (_canLoot) then {
+ if (!((configName _type) in dayz_LootBuildings)) then {
dayz_LootBuildings set [count dayz_LootBuildings, configName _type];
};
};
diff --git a/@DayZRedux/Addons/dayz_code/init/object_gearAction.sqf b/@DayZRedux/Addons/dayz_code/init/object_gearAction.sqf
index 17864f3..d00db53 100644
--- a/@DayZRedux/Addons/dayz_code/init/object_gearAction.sqf
+++ b/@DayZRedux/Addons/dayz_code/init/object_gearAction.sqf
@@ -1,4 +1,4 @@
-private["_holder","_type","_classname","_name"];
+private ["_holder","_type","_classname","_name"];
_holder = _this;
null = _holder addAction [format["Gear"], "\z\addons\dayz_code\actions\object_gear.sqf", _holder, 1, true, true];
player reveal _holder;
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/init/object_pickupAction.sqf b/@DayZRedux/Addons/dayz_code/init/object_pickupAction.sqf
index 90e7706..09d1a4d 100644
--- a/@DayZRedux/Addons/dayz_code/init/object_pickupAction.sqf
+++ b/@DayZRedux/Addons/dayz_code/init/object_pickupAction.sqf
@@ -1,14 +1,12 @@
-private["_holder","_type","_classname","_name"];
+private ["_holder","_type","_classname","_name"];
_holder = _this select 0;
_type = _this select 1;
_classname = _this select 2;
_name = getText (configFile >> _type >> _classname >> "displayName");
-pickupInit = true;
-
actionMonitor = {
- private["_holder","_type","_classname","_name","_action","_distance","_run","_timeout"];
+ private ["_holder","_type","_classname","_name","_action","_distance","_run","_timeout"];
_holder = _this select 0;
_type = _this select 1;
_classname = _this select 2;
@@ -55,21 +53,23 @@ actionMonitor = {
};
};
+//pickupInit = true;
if (_classname == "WoodenArrow") then {
[_holder,_type,_classname,_name] spawn actionMonitor;
} else {
- if (canPickup) then {
+ //if (canPickup) then {
null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;
pickupInit = true;
- } else {
- //sleep 2;
- waitUntil {!pickupInit};
- if (canPickup) then {
- null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
- player reveal _holder;
- pickupInit = true;
- };
- };
+ //};
+/* else {
+ waitUntil {!pickupInit};
+ if (canPickup) then {
+ null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
+ player reveal _holder;
+ pickupInit = true;
+ };
+ };
+*/
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/init/object_takeBackpackAction.sqf b/@DayZRedux/Addons/dayz_code/init/object_takeBackpackAction.sqf
index 3b57e71..2f50351 100644
--- a/@DayZRedux/Addons/dayz_code/init/object_takeBackpackAction.sqf
+++ b/@DayZRedux/Addons/dayz_code/init/object_takeBackpackAction.sqf
@@ -1,4 +1,4 @@
-private["_holder","_type","_classname","_name","_actionSet"];
+private ["_holder","_type","_classname","_name","_actionSet"];
_holder = _this;
_actionSet = _holder getVariable["actionSet", false];
diff --git a/@DayZRedux/Addons/dayz_code/init/variables.sqf b/@DayZRedux/Addons/dayz_code/init/variables.sqf
index 29f8aa5..f4bc872 100644
--- a/@DayZRedux/Addons/dayz_code/init/variables.sqf
+++ b/@DayZRedux/Addons/dayz_code/init/variables.sqf
@@ -2,25 +2,31 @@ disableSerialization;
//Model Variables
B1_RX = "B1_RX";
-B2_RX = "B2_RX";
+B2_RX = "B2_RX";
BW1_RX = "BW1_RX";
S1_RX = "S2_RX";
S2_RX = "S2_RX";
-SW2_RX = "SW2_RX";
+SW2_RX = "SW2_RX";
GS1_RX = "GS1_RX";
GB1_RX = "GB1_RX ";
PS1_RX = "PS1_RX ";
PB1_RX = "PB1_RX ";
-CS1_RX = "CS1_RX";
-CB1_RX = "CB1_RX";
-BR1_RX = "BR1_RX";
-R_RX = "R_RX";
-G1_RX = "GS1_RX";
-C1_RX = "CS1_RX";
+CS1_RX = "CS1_RX";
+CB1_RX = "CB1_RX";
+BR1_RX = "BR1_RX";
+R_RX = "R_RX";
+G1_RX = "GS1_RX";
+C1_RX = "CS1_RX";
AllPlayers = ["Soldier_Crew_PMC","GS1_RX","GB1_RX","CS1_RX","CB1_RX","BR1_RX","PS1_RX","PB1_RX","R_RX"];
AllPlayersVehicles = ["Soldier_Crew_PMC","GS1_RX","GB1_RX","CS1_RX","CB1_RX","BR1_RX","PS1_RX","PB1_RX","R_RX","AllVehicles"];
+MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete"];
+MeleeMagazines = ["hatchet_swing","crowbar_swing","Machete_swing"];
+
+SafeObjects = ["Land_Fire_DZ", "TentStorage", "Wire_cat1", "Sandbag1_DZ", "Hedgehog_DZ", "Land_Mag_RX", "Land_Cont_RX", "Land_Cont2_RX"];
+
+
//Cooking
meatraw = [
"FoodSteakRaw",
@@ -212,13 +218,16 @@ dayz_resetSelfActions = {
s_build_Wire_cat1 = -1;
s_player_deleteBuild = -1;
s_player_forceSave = -1;
- s_player_igniteTentSwitch = -1;
- s_player_igniteBoxSwitch = -1;
- s_player_igniteBoxYes = -1;
- s_player_igniteBoxNo = -1;
- s_player_igniteTentYes = -1;
- s_player_igniteTentNo = -1;
+ s_player_igniteTentSwitch = -1;
+ s_player_igniteBoxSwitch = -1;
+ s_player_igniteBoxYes = -1;
+ s_player_igniteBoxNo = -1;
+ s_player_igniteTentYes = -1;
+ s_player_igniteTentNo = -1;
s_player_retrievebox = -1;
+ s_player_diggrave = -1;
+ s_player_burybody = -1;
+ s_player_dragbody = -1;
s_player_flipveh = -1;
s_player_stats = -1;
s_player_sleep = -1;
@@ -232,6 +241,8 @@ dayz_resetSelfActions = {
s_player_barkdog = -1;
s_player_warndog = -1;
s_player_followdog = -1;
+ s_player_tamedog = -1;
+ diggingGrave = false;
};
call dayz_resetSelfActions;
@@ -239,14 +250,19 @@ call dayz_resetSelfActions;
canPickup = false;
pickupInit = false;
-//Allow player to leave by default
+//Allow player to leave by default -- Disallow forced leaving
canAbort = true;
+canAbortForce = false;
//Engineering variables
s_player_lastTarget = objNull;
s_player_repairActions = [];
+s_player_removeactions = [];
+silver_myCursorTarget = objNull;
//Initialize Medical Variables
+force_dropBody = false;
+forceDrag = false;
r_interrupt = false;
r_doLoop = false;
r_self = false;
@@ -370,13 +386,13 @@ dayz_spawnPos = getPosATL player;
//init global arrays for Loot Chances
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\loot_init.sqf";
-if(isServer) then {
+if (isServer) then {
dayz_players = [];
dead_bodyCleanup = [];
needUpdate_objects = [];
};
-if(!isDedicated) then {
+if (!isDedicated) then {
//Establish Location Streaming
_funcGetLocation =
{
diff --git a/@DayZRedux/Addons/dayz_code/init/vehicle_init.sqf b/@DayZRedux/Addons/dayz_code/init/vehicle_init.sqf
index f8e3aaf..41e9548 100644
--- a/@DayZRedux/Addons/dayz_code/init/vehicle_init.sqf
+++ b/@DayZRedux/Addons/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"];
_unit = _this;
_dir = getdir _this;
_location = getPosATL _this;
@@ -15,8 +15,8 @@ _eh2 = _unit addeventhandler ["Killed",{ _this call vehicle_handleKilled } ];
//diag_log format ["set EH %1 for vehicle:%2", _eh1, typeOf _unit ];
if (isServer) then {
- _eh3 = _unit addEventHandler ["GetOut", {[(_this select 0),"all"] call server_updateObject;}];
- _eh4 = _unit addEventHandler ["GetIn", {[(_this select 0),"all"] call server_updateObject;}];
+ _eh3 = _unit addEventHandler ["GetOut", {[(_this select 0),"all",true] call server_updateObject;}];
+ _eh4 = _unit addEventHandler ["GetIn", {[(_this select 0),"all",true] call server_updateObject;}];
_eh5 = _unit addEventHandler ["Killed",{ _this call vehicle_handleKilled } ];
_eh6 = _unit addeventhandler ["HandleDamage",{ _this call vehicle_handleDamage } ];
};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/init/zombie_init.sqf b/@DayZRedux/Addons/dayz_code/init/zombie_init.sqf
index 6a89b26..b471464 100644
--- a/@DayZRedux/Addons/dayz_code/init/zombie_init.sqf
+++ b/@DayZRedux/Addons/dayz_code/init/zombie_init.sqf
@@ -1,4 +1,4 @@
-private["_unit"];
+private ["_unit"];
_unit = _this select 0;
_id = _unit addeventhandler ["HandleDamage",{_this call local_zombieDamage}];
_id = _unit addeventhandler ["Killed",{[_this,"zombieKills"] call local_eventKill}];
diff --git a/@DayZRedux/Addons/dayz_code/intro.sqf b/@DayZRedux/Addons/dayz_code/intro.sqf
index 27ee82b..3bd2b50 100644
--- a/@DayZRedux/Addons/dayz_code/intro.sqf
+++ b/@DayZRedux/Addons/dayz_code/intro.sqf
@@ -68,7 +68,7 @@ _id = [] spawn {
};
for "_i" from 1001 to 1013 do {
_id = [_display,_i] spawn {
- private["_control","_display","_i","_v","_x"];
+ private ["_control","_display","_i","_v","_x"];
disableSerialization;
_display = _this select 0;
_i = _this select 1;
@@ -78,7 +78,7 @@ for "_i" from 1001 to 1013 do {
//Move it
_id = [_control,_i] spawn {
- private["_control","_display","_i","_v","_x","_w","_h","_y","_val","_pos"];
+ private ["_control","_display","_i","_v","_x","_w","_h","_y","_val","_pos"];
disableSerialization;
_dir = [
[-0.5,0],
diff --git a/@DayZRedux/Addons/dayz_code/medical/antibiotics.sqf b/@DayZRedux/Addons/dayz_code/medical/antibiotics.sqf
index ab6307a..be54926 100644
--- a/@DayZRedux/Addons/dayz_code/medical/antibiotics.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/antibiotics.sqf
@@ -1,4 +1,4 @@
-private["_hasMeds","_med","_effect"];
+private ["_hasMeds","_med","_effect"];
_med = "ItemAntibiotic";
_hasMeds = _med in magazines player;
if (_hasMeds) then {
diff --git a/@DayZRedux/Addons/dayz_code/medical/bandage.sqf b/@DayZRedux/Addons/dayz_code/medical/bandage.sqf
index df51475..41ab1e7 100644
--- a/@DayZRedux/Addons/dayz_code/medical/bandage.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/bandage.sqf
@@ -45,7 +45,7 @@ if (_finished) then {
dayz_sourceBleeding = objNull;
} else {
//dayzHumanity = [player,20];
- [player,20] call player_humanityChange;
+ [player,10] call player_humanityChange;
};
{_unit setVariable[_x,false,true];} forEach USEC_woundHit;
diff --git a/@DayZRedux/Addons/dayz_code/medical/drag.sqf b/@DayZRedux/Addons/dayz_code/medical/drag.sqf
index edd45c0..14f7888 100644
--- a/@DayZRedux/Addons/dayz_code/medical/drag.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/drag.sqf
@@ -9,17 +9,43 @@
Start drag.sqf
*/
-private ["_unit","_dragee","_pos","_dir"];
+private ["_unit","_dragee","_pos","_dir","_bodyPos","_bodyHeight","_bodyATL","_canDo","_onLadder","_animState","_isDoing","_addAction"];
_dragee = _this select 3;
_unit = player;
_unconscious = _dragee getVariable ["NORRN_unconscious", false];
+_animState = animationState player;
+_isDoing = ["medic",_animState] call fnc_inString;
+_addAction = false;
-if (isNull _dragee) exitWith {};
-if (!_unconscious) exitWith {};
+ if (isNull _dragee) exitWith {};
+ if (currentWeapon player == "") exitWith { cutText ["Equip a weapon before dragging!","PLAIN DOWN"]; };
+ if ((currentWeapon player == "Binocular") or (currentWeapon player == "Binocular_Vector")) exitWith { cutText ["Select a primary or secondary weapon before dragging!","PLAIN DOWN"]; };
+
+ if (!forceDrag) then {
+ if (!_unconscious) exitWith {};
+ };
+
+ if (_isDoing) exitWith {cutText ["You cannot drag a body while performing another action!","PLAIN DOWN"];};
+
+_bodyPos = getPosATL _dragee;
+_bodyHeight = _bodyPos select 2;
+_bodyATL = _bodyHeight >= -0.2;
+_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
+_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
+
+ if (!_canDo) exitWith { if (r_drag_sqf) then { [cursorTarget, _unit, _unconscious, _dragee] execVM "\z\addons\dayz_code\medical\drop_body.sqf"; }; }; //prevent duplicate drags
+ if (!_bodyATL) exitWith { cutText ["You cannot drag a body that has been burried!","PLAIN DOWN"]; };
//player assumes dragging posture
-_dragee setVariable ["NORRN_unit_dragged", true, true];
-_unit playActionNow "grabDrag";
+r_drag_sqf = true;
+while {r_drag_sqf} do {
+if (!_addAction) then {
+_dragee setVariable ["NORRN_unit_dragged", true, true];
+
+_unit switchMove "";
+sleep 1;
+//_unit playActionNow "grabDrag";
+_unit playMoveNow "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
sleep 2;
//unconscious unit assumes dragging posture
@@ -35,7 +61,6 @@ sleep 0.02;
norrnR180 = _dragee;
publicVariable "norrnR180";
_dragee setDir 180;
-r_drag_sqf = true;
//Uneccesary actions removed & drop body added
call fnc_usec_medic_removeActions;
@@ -43,5 +68,16 @@ call fnc_usec_medic_removeActions;
NORRN_dropAction = player addAction ["Drop body", "\z\addons\dayz_code\medical\drop_body.sqf",_dragee, 0, false, true];
//NORRN_carryAction = player addAction ["Carry body", "\z\addons\dayz_code\medical\carry.sqf",_dragee, 0, false, true];
sleep 1;
+_addAction = true;
+};
+ if (force_dropBody) then {
+ [cursorTarget, _unit, _unconscious, _dragee] execVM "\z\addons\dayz_code\medical\drop_body.sqf";
+ };
-if (true) exitWith {};
+ if (vehicle player != player) then {
+ player action ["eject", vehicle player];
+ cutText ["You cannot enter a vehicle while dragging a body!","PLAIN DOWN"];
+ [cursorTarget, _unit, _unconscious, _dragee] execVM "\z\addons\dayz_code\medical\drop_body.sqf";
+ };
+if (!r_drag_sqf) exitWith {};
+};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/medical/drop_body.sqf b/@DayZRedux/Addons/dayz_code/medical/drop_body.sqf
index b25c710..3bba435 100644
--- a/@DayZRedux/Addons/dayz_code/medical/drop_body.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/drop_body.sqf
@@ -8,10 +8,12 @@
Start drop_body.sqf
*/
-_dragee = _this select 3;
+_dragee = _this select 3;
player removeAction NORRN_dropAction;
-player removeAction NORRN_carryAction;
+if (!isNil "NORRN_carryAction") then {
+ player removeAction NORRN_carryAction;
+};
NORRN_remove_drag = true;
r_drag_sqf = false;
r_carry_sqf = false;
@@ -29,5 +31,6 @@ _dragee setVariable ["NORRN_unit_dragged", false, true];
_dragee playMoveNow "ainjppnemstpsnonwrfldnon";
norrnRalie = _dragee;
publicVariable "norrnRalie";
+force_dropBody = false;
if (true) exitWith {};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/medical/load/load_act.sqf b/@DayZRedux/Addons/dayz_code/medical/load/load_act.sqf
index 4651f86..6649c3a 100644
--- a/@DayZRedux/Addons/dayz_code/medical/load/load_act.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/load/load_act.sqf
@@ -15,17 +15,17 @@ call fnc_usec_medic_removeActions;
_dragger removeAction NORRN_loadWoundedAction;
if ((_vcl emptyPositions "cargo") > 0) then
-{
+{
detach _wounded;
_dragger switchMove "";
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
sleep 1;
//["norrnRLact",_wounded] call broadcastRpcCallAll;
- norrnRLact = [_wounded];
+ [_wounded] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf";
+ norrnRLact = _wounded;
publicVariable "norrnRLact";
player removeAction NORRN_dropAction;
-}else{
-
+} else {
hint "No space left in vehicle";
};
NORRN_load_wounded_action = true;
diff --git a/@DayZRedux/Addons/dayz_code/medical/load/load_wounded.sqf b/@DayZRedux/Addons/dayz_code/medical/load/load_wounded.sqf
index f2ed71a..90aa5a0 100644
--- a/@DayZRedux/Addons/dayz_code/medical/load/load_wounded.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/load/load_wounded.sqf
@@ -15,17 +15,18 @@ _wounded assignAsCargo _vcl;
_wounded moveInCargo _vcl;
sleep 1;
//["norrnRALW",_wounded] call broadcastRpcCallAll;
- norrnRALW = [_wounded];
+ norrnRALW = _wounded;
publicVariable "norrnRALW";
+ _wounded switchMove "kia_hmmwv_driver";
if (local _wounded) then
{
waitUntil {!(_wounded getVariable "NORRN_unconscious")|| !alive _wounded || vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo"};
- if (vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo") exitWith
+ if ((vehicle _wounded == _wounded) || (assignedVehicleRole _wounded) select 0 != "Cargo") exitWith
{
if (_wounded getVariable "NORRN_AIunconscious") then
- {
+ {
if (vehicle _wounded != _wounded) then
{
unassignVehicle _wounded;
@@ -47,5 +48,5 @@ if (local _wounded) then
};
};
sleep 0.01;
-if (true) exitWith {};
-
+forceLoad = false;
+if (true) exitWith {};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/medical/load_wounded.sqf b/@DayZRedux/Addons/dayz_code/medical/load_wounded.sqf
index ec32fd6..0325c49 100644
--- a/@DayZRedux/Addons/dayz_code/medical/load_wounded.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/load_wounded.sqf
@@ -3,9 +3,10 @@
private ["_wounded","_vcl","_group"];
-_wounded = _this select 0;
+ _wounded = _this select 0;
+//_wounded = cursorTarget;
-//if (!local _wounded) exitWith {};
+if (!local _wounded) exitWith {};
r_action = false;
@@ -17,7 +18,7 @@ _wounded assignAsCargo _vcl;
_wounded moveInCargo _vcl;
sleep 1;
//["norrnRALW",_wounded] call broadcastRpcCallAll;
- norrnRALW = [_wounded];
+ norrnRALW = _wounded;
publicVariable "norrnRALW";
if (local _wounded) then
@@ -49,5 +50,4 @@ if (local _wounded) then
};
};
sleep 0.01;
-if (true) exitWith {};
-
+if (true) exitWith {};
\ No newline at end of file
diff --git a/@DayZRedux/Addons/dayz_code/medical/morphine.sqf b/@DayZRedux/Addons/dayz_code/medical/morphine.sqf
index a45ff6b..05708ee 100644
--- a/@DayZRedux/Addons/dayz_code/medical/morphine.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/morphine.sqf
@@ -41,7 +41,7 @@ if (_finished) then {
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
} else {
//dayzHumanity = [player,50];
- [player,50] call player_humanityChange;
+ [player,20] call player_humanityChange;
};
//["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
diff --git a/@DayZRedux/Addons/dayz_code/medical/painkiller.sqf b/@DayZRedux/Addons/dayz_code/medical/painkiller.sqf
index bfdadd0..96cc892 100644
--- a/@DayZRedux/Addons/dayz_code/medical/painkiller.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/painkiller.sqf
@@ -16,7 +16,7 @@ if (_unit == player) then {
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
} else {
//dayzHumanity = [player,20];
- [player,20] call player_humanityChange;
+ [player,10] call player_humanityChange;
};
player removeMagazine "ItemPainkiller";
diff --git a/@DayZRedux/Addons/dayz_code/medical/publicEH/medBandaged.sqf b/@DayZRedux/Addons/dayz_code/medical/publicEH/medBandaged.sqf
index e55ea55..172da67 100644
--- a/@DayZRedux/Addons/dayz_code/medical/publicEH/medBandaged.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/publicEH/medBandaged.sqf
@@ -1,5 +1,5 @@
// animHealed.sqf
-private["_array","_unit","_medic","_display","_control"];
+private ["_array","_unit","_medic","_display","_control"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
diff --git a/@DayZRedux/Addons/dayz_code/medical/publicEH/medMorphine.sqf b/@DayZRedux/Addons/dayz_code/medical/publicEH/medMorphine.sqf
index 241a816..ec25ca8 100644
--- a/@DayZRedux/Addons/dayz_code/medical/publicEH/medMorphine.sqf
+++ b/@DayZRedux/Addons/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","_hitLegs","_hitArms"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
diff --git a/@DayZRedux/Addons/dayz_code/medical/publicEH/medTransfuse.sqf b/@DayZRedux/Addons/dayz_code/medical/publicEH/medTransfuse.sqf
index bd76df3..f8fccb3 100644
--- a/@DayZRedux/Addons/dayz_code/medical/publicEH/medTransfuse.sqf
+++ b/@DayZRedux/Addons/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","_lowBlood"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
diff --git a/@DayZRedux/Addons/dayz_code/medical/setup_functions_med.sqf b/@DayZRedux/Addons/dayz_code/medical/setup_functions_med.sqf
index a2254ba..2cc30f1 100644
--- a/@DayZRedux/Addons/dayz_code/medical/setup_functions_med.sqf
+++ b/@DayZRedux/Addons/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","_eh"];
_unit = _this select 0;
mydamage_eh1 = _unit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;0} ];
mydamage_eh2 = _unit addEventHandler ["Fired", {_this call player_fired;}];
@@ -29,21 +29,21 @@ fnc_usec_pitchWhine = {
};
fnc_usec_damageUnconscious = {
- private["_unit","_damage"];
+ private ["_unit","_damage"];
_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};
+ //if (_type == 1) then {r_player_timeout = r_player_timeout + 90};
+ //if (_type == 2) then {r_player_timeout = r_player_timeout + 60};
r_player_unconscious = true;
player setVariable["medForceUpdate",true,true];
player setVariable ["unconsciousTime", r_player_timeout, true];
};
if (_inVehicle) then {
_unit spawn {
- private["_veh","_unit"];
+ private ["_veh","_unit"];
_veh = vehicle _this;
_unit = _this;
waitUntil{(((position _veh select 2 < 1) and (speed _veh < 1)) or (!r_player_unconscious))};
@@ -64,7 +64,7 @@ fnc_usec_damageUnconscious = {
//Action Handlers added to init file
fnc_usec_bulletHit = {
- private["_commit"];
+ private ["_commit"];
_commit = _this;
if (!r_player_unconscious) then {
"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit 0;
@@ -76,7 +76,7 @@ fnc_usec_bulletHit = {
};
fnc_usec_damageType = {
- private["_damage","_ammo","_type"];
+ private ["_damage","_ammo","_type"];
_damage = _this select 0;
_ammo = _this select 1;
_type = 0;
@@ -90,7 +90,7 @@ fnc_usec_damageType = {
};
fnc_usec_damageGetWound = {
- private["_hit","_sPoint","_options","_rnd","_wound"];
+ private ["_hit","_sPoint","_options","_rnd","_wound"];
_hit = format["%1",_this];
_sPoint = USEC_woundHit find _hit;
_options = USEC_woundPoint select _sPoint;
@@ -127,7 +127,7 @@ fnc_med_publicBlood = {
};
fnc_usec_playerBleed = {
- private["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime"];
+ private ["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime"];
_bleedTime = 400; //seconds
_bleedPerSec = (r_player_bloodTotal / _bleedTime);
_total = r_player_bloodTotal;
@@ -157,7 +157,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"];
_unit = _this select 0;
_wound = _this select 1;
_injury = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/medical/transfusion.sqf b/@DayZRedux/Addons/dayz_code/medical/transfusion.sqf
index ef018a1..c1b43f3 100644
--- a/@DayZRedux/Addons/dayz_code/medical/transfusion.sqf
+++ b/@DayZRedux/Addons/dayz_code/medical/transfusion.sqf
@@ -46,7 +46,7 @@ if (_finished) then {
publicVariable "usecTransfuse";
//dayzHumanity = [player,250];
- [player,250] call player_humanityChange;
+ [player,75] call player_humanityChange;
} else {
r_interrupt = false;
player switchMove "";
diff --git a/@DayZRedux/Addons/dayz_code/stringtable.xml b/@DayZRedux/Addons/dayz_code/stringtable.xml
index de1fdfe..305e23e 100644
--- a/@DayZRedux/Addons/dayz_code/stringtable.xml
+++ b/@DayZRedux/Addons/dayz_code/stringtable.xml
@@ -286,6 +286,26 @@
You cannot place a Storage Box here. It must be away from structures and in grass or forest
You cannot place a Storage Box here. It must be away from structures and in grass or forest
+
+ Dig shallow grave
+ Dig shallow grave
+ Dig shallow grave
+ Dig shallow grave
+ Dig shallow grave
+ Dig shallow grave
+ Dig shallow grave
+ Dig shallow grave
+
+
+ Bury body
+ Bury body
+ Bury body
+ Bury body
+ Bury body
+ Bury body
+ Bury body
+ Bury body
+
You have consumed a %1
You have consumed a %1
@@ -1091,6 +1111,15 @@
<t %2>Réparer %1</t>
<t %2>Opravit %1</t>
+
+ %1 Status: %2%
+ %1 Status: %2%
+ %1 состояние: %2%
+ %1 Estado: %2%
+ %1 Status: %2%
+ %1 Statut: %2%
+ %1 Status: %2%
+
Refuel %1
Refuel %1
@@ -1161,6 +1190,28 @@
Lâcher %1
Odhodit %1
+
+ Light fire
+ Feuer entzünden
+ Accendi fuoco
+ Encender fuego
+ Allumer le feu
+ Zapálit oheň
+ Зажечь огонь
+ Rozpal ogień
+ Tűz meggyújtása
+
+
+ Put out fire
+ Feuer löschen
+ Spegni fuoco
+ Apagar fuego
+ Éteindre le feu
+ Uhasit oheň
+ Потушить огонь
+ Zgaś ogień
+ Tűz eloltása
+
Extinguish %1
Extinguish %1
@@ -1271,15 +1322,68 @@
Activer les Stats
Zapnout statistiky
+
+ Survived %1 Days
+ Прожито %1 дней
+ %1 Días Sobrevividos
+ Přežito %1 dnů
+ Survécu %1 jours
+ %1 Tage überlebt
+ %1 dagen overleefd
+
+
+ Zombies Killed
+ Убито зомбей
+ Zombies Matados
+ Zombie zabito
+ Zombies Tués
+ Zombies getötet
+ Zombies gedood
+
+
+ Headshots
+ Выстрелов в голову
+ Headshots
+ Střel do hlavy
+ Tirs à la tête
+ Kopfschüsse
+ Hoofdschoten
+
+
+ Murders
+ Убийств
+ Asesinatos
+ Vražď
+ Meurtres
+ Mörder
+ Moorden
+
+
+ Bandits Killed
+ Убито бандитов
+ Bandidos Asesinados
+ Zabito banditů
+ Bandits tués
+ Getötete Banditen
+ Bandieten gedood
+
+
+ Humanity
+ Гуманность
+ Humanidad
+ Humanita
+ Humanité
+ Menschlichkeit
+ Menselijkheid
+
- Sleep
- Sleep
- Schlafen
- Поспать
- Dormir
- Sleep
- Dormir
- Spát
+ Rest
+ Rest
+ Отдохнуть
+ Descansar
+ Rest
+ Se reposer
+ Odpočívat
Bandit
diff --git a/@DayZRedux/Addons/dayz_code/system/antihack.sqf b/@DayZRedux/Addons/dayz_code/system/antihack.sqf
index 4311545..2260ac4 100644
--- a/@DayZRedux/Addons/dayz_code/system/antihack.sqf
+++ b/@DayZRedux/Addons/dayz_code/system/antihack.sqf
@@ -4,7 +4,7 @@
Refactored By Alby
*/
-private["_debug","_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed"];
+private ["_debug","_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed"];
waitUntil {vehicle player == player};
diff --git a/@DayZRedux/Addons/dayz_code/system/building_monitor.sqf b/@DayZRedux/Addons/dayz_code/system/building_monitor.sqf
index 837a0bd..e64ba23 100644
--- a/@DayZRedux/Addons/dayz_code/system/building_monitor.sqf
+++ b/@DayZRedux/Addons/dayz_code/system/building_monitor.sqf
@@ -1,4 +1,4 @@
-private["_building","_GroupMarker","_list","_nearby","_run"];
+private ["_building","_GroupMarker","_list","_nearby","_run"];
_building = _this select 0;
_GroupMarker = _this select 1;
_items = _this select 2;
diff --git a/@DayZRedux/Addons/dayz_code/system/dog_agent.fsm b/@DayZRedux/Addons/dayz_code/system/dog_agent.fsm
index 3305430..d88725e 100644
--- a/@DayZRedux/Addons/dayz_code/system/dog_agent.fsm
+++ b/@DayZRedux/Addons/dayz_code/system/dog_agent.fsm
@@ -570,7 +570,7 @@ class FSM
class Staying
{
name = "Staying";
- init = /*%FSM*/"if(_standing) then {" \n
+ init = /*%FSM*/"if (_standing) then {" \n
" _standing = false;" \n
" if (!_watchDog) then {" \n
" _move = ""Dog_LieDown"";" \n
@@ -965,7 +965,7 @@ class FSM
" _dog = createAgent [_type, _Pos, [], 0, ""NONE""];" \n
" _pos = [(getPos player),1,3,4,0,5,0] call BIS_fnc_findSafePos;" \n
" _dog setpos _pos;" \n
- "} ;" \n
+ "};" \n
"" \n
"diag_log ""DOG RECREATED"";"/*%FSM*/;
};
diff --git a/@DayZRedux/Addons/dayz_code/system/fire_monitor.sqf b/@DayZRedux/Addons/dayz_code/system/fire_monitor.sqf
index df641c4..6a6e4bb 100644
--- a/@DayZRedux/Addons/dayz_code/system/fire_monitor.sqf
+++ b/@DayZRedux/Addons/dayz_code/system/fire_monitor.sqf
@@ -1,4 +1,4 @@
-private["_firePlace","_ok","_mags","_serial","_qty","_countr"];
+private ["_firePlace","_ok","_mags","_serial","_qty","_countr"];
_firePlace = _this;
while {alive _firePlace} do {
while {inflamed _firePlace and alive _fireplace} do {
diff --git a/@DayZRedux/Addons/dayz_code/system/player_monitor.fsm b/@DayZRedux/Addons/dayz_code/system/player_monitor.fsm
index 5fc9d8f..7a4d22f 100644
--- a/@DayZRedux/Addons/dayz_code/system/player_monitor.fsm
+++ b/@DayZRedux/Addons/dayz_code/system/player_monitor.fsm
@@ -129,8 +129,8 @@ link64[] = {55,56};
link65[] = {56,57};
link66[] = {57,58};
link67[] = {58,59};
-globals[] = {25.000000,1,0,0,0,640,480,1,90,6316128,1,-340.044830,364.444611,393.922516,-458.455902,524,634,1};
-window[] = {0,-1,-1,-32000,-32000,1014,234,1606,234,1,542};
+globals[] = {25.000000,1,0,0,0,640,480,1,90,6316128,1,-595.022766,163.984177,536.135620,-382.204834,524,634,1};
+window[] = {0,-1,-1,-1,-1,1014,234,1606,234,1,542};
*//*%FSM*/
class FSM
{
@@ -224,8 +224,12 @@ class FSM
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"!isnil ""bis_fnc_init"""/*%FSM*/;
action=/*%FSM*/"dayz_forceSave = {" \n
+ "_gearSave = false;" \n
"" \n
+ "if (!dialog) then {" \n
" createGearDialog [player, ""RscDisplayGear""];" \n
+ " _gearSave = true;" \n
+ "};" \n
"" \n
"_dialog = findDisplay 106;" \n
"_magazineArray = [];" \n
@@ -261,9 +265,9 @@ class FSM
" };" \n
" };" \n
"};" \n
- "" \n
- " closeDialog 0;" \n
- "" \n
+ " if (_gearSave) then {" \n
+ " closeDialog 0;" \n
+ " };" \n
" _medical = player call player_sumMedical;" \n
" " \n
" /*" \n
@@ -274,6 +278,7 @@ class FSM
" _config = configFile >> ""CfgMovesMaleSdr"" >> ""States"" >> _currentAnim;" \n
" _onLadder = (getNumber (_config >> ""onLadder"")) == 1;" \n
" _isTerminal = (getNumber (_config >> ""terminal"")) == 1;" \n
+ " _isInVehicle = vehicle player != player;" \n
" //_wpnDisabled = (getNumber (_config >> ""disableWeapons"")) == 1;" \n
" _currentModel = typeOf player;" \n
" _charPos = getPosATL player;" \n
@@ -449,7 +454,7 @@ class FSM
"_msg = [];" \n
"" \n
"dayzLogin = [_playerUID,player];" \n
- "publicVariable ""dayzLogin"";" \n
+ "publicVariableServer ""dayzLogin"";" \n
"" \n
"if (isServer) then {" \n
" dayzLogin call server_playerLogin;" \n
@@ -684,7 +689,7 @@ class FSM
"//[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
"" \n
"dayzLogin2 = [_charID,player,_playerUID];" \n
- "publicVariable ""dayzLogin2"";" \n
+ "publicVariableServer ""dayzLogin2"";" \n
"" \n
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
"progressLoadingScreen 0.8;" \n
@@ -1026,7 +1031,7 @@ class FSM
" //Establish default weapon" \n
" if (count weapons player > 0) then" \n
" {" \n
- " private['_type', '_muzzles'];" \n
+ " private ['_type', '_muzzles'];" \n
"" \n
" _type = ((weapons player) select 0);" \n
" // check for multiple muzzles (eg: GL)" \n
@@ -1101,7 +1106,7 @@ class FSM
"""colorCorrections"" ppEffectCommit 0;" \n
"" \n
"dayz_gui = [] spawn {" \n
- " private[""_distance""];" \n
+ " private [""_distance""];" \n
" dayz_musicH = [] spawn player_music;" \n
" while {true} do {" \n
" _array = player call world_surfaceNoise;" \n
@@ -1137,7 +1142,7 @@ class FSM
"dayz_animalCheck = [] spawn player_spawn_1;" \n
"" \n
"dayz_lootCheck = [_playerUID,_charID] spawn {" \n
- " private[""_handle"",""_humanity"",""_playerUID"",""_oldModel"",""_runOnce""];" \n
+ " private [""_handle"",""_humanity"",""_playerUID"",""_oldModel"",""_runOnce""];" \n
" _playerUID = _this select 0;" \n
" _charID = _this select 1;" \n
" _runOnce = false;" \n
@@ -1182,7 +1187,9 @@ class FSM
"//FPOnly = 1 is First Person only in vehicles" \n
"//FPOnly = 2 is First Person only on foot" \n
"" \n
+ "" \n
"dayz_vehicleCamCheck = [] spawn {" \n
+ "if (!isNil ""FPOnly"") then {" \n
" while {FPOnly > 0} do {" \n
" if (FPOnly == 1) then {" \n
" IF (vehicle player != player) THEN {" \n
@@ -1196,12 +1203,13 @@ class FSM
" };" \n
"};" \n
"};" \n
+ "};" \n
"" \n
"" \n
"// TODO: questionably" \n
"{ _x call fnc_vehicleEventHandler; } forEach vehicles;" \n
"" \n
- "private[""_fadeFire""];" \n
+ "private [""_fadeFire""];" \n
"{" \n
" _fadeFire = _x getVariable['fadeFire', true];" \n
" if (!_fadeFire) then {" \n
@@ -1235,7 +1243,7 @@ class FSM
"//[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
"" \n
"dayzLoginRecord = [_playerUID,_charID,0];" \n
- "publicVariable ""dayzLoginRecord"";" \n
+ "publicVariableServer ""dayzLoginRecord"";" \n
"" \n
"endLoadingScreen;" \n
""/*%FSM*/;
diff --git a/@DayZRedux/Addons/dayz_code/system/player_spawn_1.sqf b/@DayZRedux/Addons/dayz_code/system/player_spawn_1.sqf
index 7032afd..3bd482c 100644
--- a/@DayZRedux/Addons/dayz_code/system/player_spawn_1.sqf
+++ b/@DayZRedux/Addons/dayz_code/system/player_spawn_1.sqf
@@ -1,4 +1,4 @@
-private["_handle","_body","_cursor","_delMe"];
+private ["_handle","_body","_cursor","_delMe"];
while {true} do {
_handle = [] spawn player_animalCheck;
waitUntil{scriptDone _handle};
@@ -17,7 +17,7 @@ while {true} do {
_cursor = 0;
_delMe = false;
{
- private["_bPos","_isNoone"];
+ private ["_bPos","_isNoone"];
_bPos = getPosATL _x;
_isNoone = {isPlayer _x} count (_bPos nearEntities ["Man",200]) == 0;
if (_isNoone) then {
@@ -35,7 +35,7 @@ while {true} do {
_cursor = 0;
_delMe = false;
{
- private["_bPos","_isNoone"];
+ private ["_bPos","_isNoone"];
_bPos = getPosATL _x;
_isNoone = {isPlayer _x} count (_bPos nearEntities ["Man",50]) == 0;
if (_isNoone) then {
@@ -51,7 +51,7 @@ while {true} do {
*/
//Check if new day
_day = round(360 * (dateToNumber date));
- if(dayz_currentDay != _day) then {
+ if (dayz_currentDay != _day) then {
dayz_sunRise = call world_sunRise;
dayz_currentDay = _day;
};
diff --git a/@DayZRedux/Addons/dayz_code/system/player_spawn_2.sqf b/@DayZRedux/Addons/dayz_code/system/player_spawn_2.sqf
index c882d65..b954c45 100644
--- a/@DayZRedux/Addons/dayz_code/system/player_spawn_2.sqf
+++ b/@DayZRedux/Addons/dayz_code/system/player_spawn_2.sqf
@@ -1,4 +1,4 @@
-private["_refObj","_size","_vel","_speed","_hunger","_thirst","_array","_unsaved","_timeOut","_result","_lastSave","_isokay"];
+private ["_refObj","_size","_vel","_speed","_hunger","_thirst","_array","_unsaved","_timeOut","_result","_lastSave","_isokay","_mylastPos"];
disableSerialization;
_timeOut = 0;
_messTimer = 0;
@@ -34,7 +34,11 @@ while {true} do {
if (_distance < 500) then {
_randomSpot = false;
};
+ if (!isNil "_mylastPos") then {
_distance = _mylastPos distance _tempPos;
+ } else {
+ _distance = _tempPos distance _tempPos;
+ };
if (_distance > 400) then {
_randomSpot = false;
};
@@ -256,7 +260,7 @@ while {true} do {
dayz_canDisconnect = true;
//["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
dayzDiscoRem = getPlayerUID player;
- publicVariable "dayzDiscoRem";
+ publicVariableServer "dayzDiscoRem";
//Ensure Control is hidden
_display = uiNamespace getVariable 'DAYZ_GUI_display';
@@ -269,15 +273,11 @@ while {true} do {
//Save Checker
if (dayz_unsaved) then {
if ((time - dayz_lastSave) > _saveTime) then {
- //["dayzPlayerSave",[player,dayz_Magazines,false]] call callRpcProcedure;
-
dayzPlayerSave = [player,dayz_Magazines,false];
publicVariableServer "dayzPlayerSave";
-
if (isServer) then {
dayzPlayerSave call server_playerSync;
};
-
dayz_lastSave = time;
dayz_Magazines = [];
};
@@ -292,15 +292,16 @@ while {true} do {
};
//Pause for pickup actions
- _isokay = pickupInit AND !canPickup || !pickupInit AND canPickup;
- if (pickupInit AND !canPickup) then {
- canPickup = true;
- pickupInit = false;
+ _isokay = pickupInit AND !canPickup || !pickupInit AND canPickup;
+ if (pickupInit AND !canPickup) then {
+ canPickup = true;
+ pickupInit = false;
};
+
//Reset if stuck...
if (!_isokay) then {
- canPickup = false;
- pickupInit = true;
+ canPickup = false;
+ pickupInit = true;
};
//Attach Trigger Current Object
diff --git a/@DayZRedux/Addons/dayz_sfx/CfgSounds.hpp b/@DayZRedux/Addons/dayz_sfx/CfgSounds.hpp
index 098688a..4e1e41b 100644
--- a/@DayZRedux/Addons/dayz_sfx/CfgSounds.hpp
+++ b/@DayZRedux/Addons/dayz_sfx/CfgSounds.hpp
@@ -514,21 +514,20 @@ class CfgSounds {
sound[] = {"\dayz_sfx\action\z_hit_6.ogg",0.1,1,30};
};
class z_hit_7 : z_hit_0 {
- sound[] = {"\dayz_sfx\action\z_hit_7.ogg",0.1,1,30};
+ sound[] = {"\dayz_sfx\action\z_hit_1.ogg",0.1,1,30};
};
class z_hit_8 : z_hit_0 {
- sound[] = {"\dayz_sfx\action\z_hit_8.ogg",0.1,1,30};
+ sound[] = {"\dayz_sfx\action\z_hit_2.ogg",0.1,1,30};
};
class z_hit_9 : z_hit_0 {
- sound[] = {"\dayz_sfx\action\z_hit_9.ogg",0.1,1,30};
+ sound[] = {"\dayz_sfx\action\z_hit_4.ogg",0.1,1,30};
};
class z_hit_10 : z_hit_0 {
- sound[] = {"\dayz_sfx\action\z_hit_10.ogg",0.1,1,30};
+ sound[] = {"\dayz_sfx\action\z_hit_5.ogg",0.1,1,30};
};
class z_hit_11 : z_hit_0 {
- sound[] = {"\dayz_sfx\action\z_hit_11.ogg",0.1,1,30};
+ sound[] = {"\dayz_sfx\action\z_hit_3.ogg",0.1,1,30};
};
-
class z_fracture_0 : gore_1 {
sound[] = {"\dayz_sfx\gore\fracture_0",1,1,80};
};
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_damageHandler.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_damageHandler.sqf
index 4e7788a..ec29970 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_damageHandler.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_damageHandler.sqf
@@ -111,7 +111,7 @@ if (_total > 0.4) then { //0.25
};
};
private["_isInjured"];
-if(!_isHit) then {
+if (!_isHit) then {
//Create Wound
diag_log format["DEBUG: spawn bleed %1",_wound];
_unit setVariable[_wound,true,true];
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_playerMorph.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_playerMorph.sqf
index 4bebbe6..b240fcc 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_playerMorph.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/cLog_playerMorph.sqf
@@ -51,22 +51,22 @@ _primweapon = primaryWeapon _object;
_secweapon = secondaryWeapon _object;
//Checks
-if(!(_primweapon in _weapons) && _primweapon != "") then {
+if (!(_primweapon in _weapons) && _primweapon != "") then {
_weapons = _weapons + [_primweapon];
};
-if(!(_secweapon in _weapons) && _secweapon != "") then {
+if (!(_secweapon in _weapons) && _secweapon != "") then {
_weapons = _weapons + [_secweapon];
};
-if(count _magazines == 0) then {
+if (count _magazines == 0) then {
_magazines = magazines _object;
};
//BackUp Backpack
private ["_newBackpackType","_backpackWpn","_backpackMag"];
_newBackpackType = typeOf (unitBackpack _object);
- if(_newBackpackType != "") then {
+ if (_newBackpackType != "") then {
_backpackWpn = getWeaponCargo unitBackpack _object;
_backpackMag = getMagazineCargo unitBackpack _object;
};
@@ -107,8 +107,8 @@ _magazines = (_primary select 4) select 1;
//Equip New Charactar
{ _newUnit addMagazine _x } forEach _magazines;
{ _newUnit addWeapon _x } forEach _weapons;
-if(_primweapon != (primaryWeapon _newUnit)) then { _newUnit addWeapon _primweapon };
-if(_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then { _newUnit addWeapon _secweapon };
+if (_primweapon != (primaryWeapon _newUnit)) then { _newUnit addWeapon _primweapon };
+if (_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then { _newUnit addWeapon _secweapon };
//Add and Fill BackPack
private["_newBackpack"];
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveReadWrite.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveReadWrite.sqf
index cbc3d4b..30efc7a 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveReadWrite.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveReadWrite.sqf
@@ -25,7 +25,7 @@ switch (_result select 1) do
_qresult = call compile _qresult;
_qresult = _qresult select 0;
_ret = ["",true,_qresult select 0,"S2_RX",dayz_hiveVersionNo];
- }else{
+ } else {
_qresult = call compile _qresult;
_qresult = _qresult select 0;
_ret = ["",false,_qresult select 0,[],call compile (_qresult select 1),call compile ([_qresult select 2,"["",","["""","] call fnc_replace),[call compile (_qresult select 3),call compile (_qresult select 5),call compile (_qresult select 6)],call compile (_qresult select 4),dayz_hiveVersionNo];
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveWrite.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveWrite.sqf
index ee5aff5..d4c51ed 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveWrite.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_hiveWrite.sqf
@@ -29,16 +29,16 @@ switch (_key) do
_mdrank = _result select 8;
_mtime = _result select 12;
- if(_mate == "false") then { _mate = _mtime; }
+ if (_mate == "false") then { _mate = _mtime; }
else{_mate = -1;};
- if(_mdrank == "false") then { _mdrank = _mtime; }
+ if (_mdrank == "false") then { _mdrank = _mtime; }
else{ _mdrank = -1; };
_mmodel = _result select 16;
- if(_mmodel == "") then { _mmodel = "any" };
+ if (_mmodel == "") then { _mmodel = "any" };
_mhumanity = _result select 17;
- if(_mhumanity == "0") then { _mhumanity = 0 };
+ if (_mhumanity == "0") then { _mhumanity = 0 };
"blisshive" callExtension format ["E:%1:call proc_updateSurvivor(%2, '%3', '%4', '%5', '%6', %7, %8, %9, '%10', %11, %12, %13, %14, %15, '%16')", (call fnc_instanceName), _mid,_result select 3,_result select 4,_result select 5,_result select 6,_mate,_mdrank,_mtime,_mmodel,_mhumanity,_result select 9,_result select 10,_result select 14,_result select 15,_result select 13];
};
case "202":{
@@ -74,7 +74,7 @@ switch (_key) do
//diag_log("UPDOBJ:305");
//format["CHILD:305:%1:%2:%3:", _objectID, _worldspace, fuel _object];
_fuel = _result select 4;
- if(_fuel == '') then { _fuel = -1 };
+ if (_fuel == '') then { _fuel = -1 };
"blisshive" callExtension format ["E:%1:call proc_updateObjectPosition(%2, '%3', %4)", (call fnc_instanceName), _result select 2, _result select 3, _fuel];
};
case "306":{
@@ -82,7 +82,7 @@ switch (_key) do
//diag_log("UPDIH:306");
//format["CHILD:306:%1:%2:%3:", _objectID, _array, damage _object];
_damage = _result select 4;
- if( _damage == '' ) then { _damage = -1 };
+ if ( _damage == '' ) then { _damage = -1 };
"blisshive" callExtension format ["E:%1:call proc_updateObjectHealth(%2, '%3', %4)", (call fnc_instanceName), _result select 2, _result select 3, _damage];
};
case "308":{
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerDied.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerDied.sqf
index 1f0e1d2..69d6dcf 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerDied.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerDied.sqf
@@ -6,7 +6,7 @@ _newObject = _this select 2;
_playerID = _this select 3;
_playerName = _this select 4;
-dayz_disco = dayz_disco - [_playerID];
+//dayz_disco = dayz_disco - [_playerID]; //no longer used
_newObject setVariable["processedDeath",time];
/*
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSetup.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSetup.sqf
index f007603..6fa4d37 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSetup.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSetup.sqf
@@ -194,7 +194,7 @@ if (_randomSpot) then {
_isIsland = false; //Can be set to true during the Check
for [{_w=0},{_w<=150},{_w=_w+2}] do {
_pos = [((_pos select 0) - _w),((_pos select 1) + _w),(_pos select 2)];
- if(surfaceisWater _pos) exitWith {
+ if (surfaceisWater _pos) exitWith {
_isIsland = true;
};
};
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSync.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSync.sqf
index 5981344..ddc59d1 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSync.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_playerSync.sqf
@@ -228,7 +228,7 @@ if (_characterID != "0") then {
_pos = _this select 0;
{
[_x, "gear"] call server_updateObject;
- } forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "land_mag_RX", "Land_Cont_RX", "Land_Cont2_RX"], 10];
+ } forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "land_Mag_RX", "Land_Cont_RX", "Land_Cont2_RX"], 10];
//[_charPos] call server_updateNearbyObjects;
//Reset timer
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_spawnCrashSite.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_spawnCrashSite.sqf
index a25ceef..6d39590 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_spawnCrashSite.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_spawnCrashSite.sqf
@@ -106,11 +106,13 @@ switch _crashModel do {
_crash setVariable ["ObjectID",1,true];
if (_spawnFire) then {
- //["dayzFire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
- dayzFire = [_crash,2,time,false,_fadeFire];
- publicVariable "dayzFire";
- nul=dayzFire spawn BIS_Effects_Burn;
- _crash setvariable ["fadeFire",_fadeFire,true];
+ if (floor(random 100) >= 65) then {
+ //["dayzFire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
+ dayzFire = [_crash,2,time,false,_fadeFire];
+ publicVariable "dayzFire";
+ nul=dayzFire spawn BIS_Effects_Burn;
+ _crash setvariable ["fadeFire",_fadeFire,true];
+ };
};
_num = round(random _randomizedLoot) + _guaranteedLoot;
@@ -125,8 +127,8 @@ switch _crashModel do {
_itemType = [] + getArray (_config >> "itemType");
if (isNil "fnc_buildWeightedArray") then {
- fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf";
- };
+ fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf";
+ };
waituntil {!isnil "fnc_buildWeightedArray"};
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_updateObject.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_updateObject.sqf
index b5c8cd3..bbc99ea 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/server_updateObject.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/server_updateObject.sqf
@@ -96,7 +96,8 @@ _object_damage = {
if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
_object setHit ["_selection", _hit]
} forEach _hitpoints;
-
+
+ //_object setdamage _damage;
//Mark for db update
if (((time - _lastUpdate) > 5) or _forced) then {
if (_object in needUpdate_objects) then {
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/compile/spawn_loot.sqf b/ArmA Directory/@Hive/Addons/dayz_server/compile/spawn_loot.sqf
index b69076a..dbf4dcc 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/compile/spawn_loot.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/compile/spawn_loot.sqf
@@ -51,7 +51,7 @@ switch (_iClass) do {
case "object": {
// Do not spawn another "object" type if there's already an "object" type there.
//_nearObjects = nearestObjects [_iPos, ["Bag_Base_EP1","CardboardBox","AmmoBoxSmall"],1];
- //if (count _nearobjects > 0) exitWith{};
+ //if (count _nearobjects > 0) exitWith {};
//Item is one magazine
_item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/init/server_functions.sqf b/ArmA Directory/@Hive/Addons/dayz_server/init/server_functions.sqf
index d275648..ee24e97 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/init/server_functions.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/init/server_functions.sqf
@@ -32,7 +32,7 @@ vehicle_handleInteract = {
if (_object in needUpdate_objects) then {
needUpdate_objects = needUpdate_objects - [_object];
};
- [_object, "damage",true] call server_updateObject;
+ [_object, "all",true] call server_updateObject;
};
vehicle_handleServerKilled = {
@@ -72,7 +72,7 @@ eh_localCleanup = {
private ["_object"];
_object = _this select 0;
_object addEventHandler ["local", {
- if(_this select 1) then {
+ if (_this select 1) then {
private["_type","_unit"];
_unit = _this select 0;
_type = typeOf _unit;
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/system/s_fps.sqf b/ArmA Directory/@Hive/Addons/dayz_server/system/s_fps.sqf
index fcaea7e..a539ec5 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/system/s_fps.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/system/s_fps.sqf
@@ -6,5 +6,4 @@ while {isServer} do {
};
sleep 181;
};
-sleep 181;
-};
\ No newline at end of file
+sleep 181;
\ No newline at end of file
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/system/server_cleanup.fsm b/ArmA Directory/@Hive/Addons/dayz_server/system/server_cleanup.fsm
index 5d575aa..04922c4 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/system/server_cleanup.fsm
+++ b/ArmA Directory/@Hive/Addons/dayz_server/system/server_cleanup.fsm
@@ -3,9 +3,9 @@
/*
item0[] = {"init",0,250,-75.000000,-400.000000,25.000000,-350.000000,0.000000,"init"};
item1[] = {"true",8,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"true"};
-item2[] = {"waiting",2,4346,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"waiting"};
+item2[] = {"waiting",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"waiting"};
item3[] = {"too_many_dead",4,218,-150.000000,-25.000000,-50.000000,25.000000,3.000000,"too many" \n "dead"};
-item4[] = {"cleanup_dead",2,250,-175.000000,50.000000,-75.000000,100.000000,0.000000,"cleanup" \n "dead"};
+item4[] = {"cleanup_dead",2,4346,-175.000000,50.000000,-75.000000,100.000000,0.000000,"cleanup" \n "dead"};
item5[] = {"too_many_objects",4,218,-25.000000,-25.000000,75.000000,25.000000,2.000000,"too many" \n "objects"};
item6[] = {"cleanup_objects",2,250,25.000000,50.000000,125.000000,100.000000,0.000000,"cleanup" \n "objects"};
item7[] = {"time_sync",4,218,-200.000000,-50.000000,-100.000000,0.000000,0.000000,"time" \n "sync"};
@@ -43,8 +43,8 @@ link19[] = {15,16};
link20[] = {16,1};
link21[] = {17,9};
link22[] = {18,17};
-globals[] = {25.000000,1,0,0,0,640,480,1,27,6316128,1,-396.580658,354.272186,429.218872,-298.099792,323,864,1};
-window[] = {0,-1,-1,-32000,-32000,806,26,1355,26,1,341};
+globals[] = {25.000000,1,0,0,0,640,480,1,27,6316128,1,-396.580658,354.272186,429.218872,-298.099792,323,634,1};
+window[] = {0,-1,-1,-1,-1,858,78,1407,78,1,341};
*//*%FSM*/
class FSM
{
@@ -152,7 +152,7 @@ class FSM
" _delQtyZ = _delQtyZ + 1;" \n
" } else {" \n
" _exists = _x in _deadBodies;" \n
- " if(!_exists) then {" \n
+ " if (!_exists) then {" \n
" _deadBodies set [count _deadBodies,_x];" \n
" };" \n
" };" \n
@@ -167,7 +167,8 @@ class FSM
"if (_delDo<1) then {_delDo=1};" \n
"for ""_i"" from 0 to _delDo do {" \n
" _body = _deadBodies select _i;" \n
- " if(!isNil ""_body"") then {" \n
+ " _nearGrave = nearestObject [_body,""GraveCrossHelmet_EP1""];" \n
+ " if ((!isNil ""_body"") and (_nearGrave distance _body <= 1)) then {" \n
" _pos = getPosATL _body;" \n
" _sfx = nearestObject [_pos,""Sound_Flies""];" \n
" if (!(isNull _sfx)) then {" \n
@@ -292,7 +293,7 @@ class FSM
"_key = ""CHILD:307:"";" \n
"_result = _key call server_hiveReadWrite;" \n
"_outcome = _result select 0;" \n
- "if(_outcome == ""PASS"") then {" \n
+ "if (_outcome == ""PASS"") then {" \n
" _date = _result select 1;" \n
"" \n
" //date setup" \n
@@ -343,7 +344,7 @@ class FSM
"/*" \n
"//Check for Ammobox" \n
" {" \n
- " if(!(_x isKindOf ""WeaponHolder"")) then {" \n
+ " if (!(_x isKindOf ""WeaponHolder"")) then {" \n
" diag_log (""CLEANUP: DELETING AN AMMOBOX "" + (typeOf _x));" \n
" deleteVehicle _x;" \n
" };" \n
@@ -352,7 +353,7 @@ class FSM
"" \n
"//Check for hackers" \n
" {" \n
- " if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
+ " if (vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
" (vehicle _x) setDamage 1;" \n
" _x setDamage 1;" \n
diff --git a/ArmA Directory/@Hive/Addons/dayz_server/system/server_monitor.sqf b/ArmA Directory/@Hive/Addons/dayz_server/system/server_monitor.sqf
index 453d832..217b65b 100644
--- a/ArmA Directory/@Hive/Addons/dayz_server/system/server_monitor.sqf
+++ b/ArmA Directory/@Hive/Addons/dayz_server/system/server_monitor.sqf
@@ -2,6 +2,7 @@
dayz_versionNo = getText(configFile >> "CfgMods" >> "DayZ" >> "version");
dayz_hiveVersionNo = getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
+private ["_random","_date","_year","_month","_day","_hour","_minute","_result","_status","_val","_pos","_wsDone","_dir","_objectPos","_block","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_position","_noTilt","_config","_locName","_buildingList","_id","_script","_key","_outcome","_myArray","_cfgLocations"];
_script = getText(missionConfigFile >> "onPauseScript");
if ((count playableUnits == 0) and !isDedicated) then {
@@ -12,16 +13,39 @@ waitUntil{initialized}; //means all the functions are now defined
diag_log "HIVE: Starting";
-if (_script != "") then
-{
- diag_log "MISSION: File Updated";
-} else {
- while {true} do
+//Set the Time
+ //Send request
+ _key = "CHILD:307:";
+ _result = _key call server_hiveReadWrite;
+ _outcome = _result select 0;
+ if (_outcome == "PASS") then {
+ _date = _result select 1;
+
+ //date setup
+ _year = _date select 0;
+ _month = _date select 1;
+ _day = _date select 2;
+ _hour = _date select 3;
+ _minute = _date select 4;
+
+ //Force full moon nights
+ _date = [2012,6,6,_hour,_minute];
+
+ if (isDedicated) then {
+ //["dayzSetDate",_date] call broadcastRpcCallAll;
+ setDate _date;
+ dayzSetDate = _date;
+ publicVariable "dayzSetDate";
+ };
+ diag_log ("HIVE: Local Time set to " + str(_date));
+ };
+
+ if (_script != "") then
{
+ diag_log "MISSION: File Updated";
+ } else {
diag_log "MISSION: File Needs Updating";
- sleep 1;
};
-};
//Stream in objects
/* STREAM OBJECTS */
@@ -170,13 +194,23 @@ if (_script != "") then
if (_object isKindOf "AllVehicles") then {
{
_selection = _x select 0;
+ if (!isNil "_selection") then {
_dam = _x select 1;
- if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
+ if (_object isKindOf "Air") then {
+ //Skip these parts to make helicopers leak or unflyable on restart.
+ } else {
+ if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
+ };
[_object,_selection,_dam] call object_setFixServer;
+ };
} forEach _hitpoints;
_object setvelocity [0,0,1];
_object setFuel _fuel;
_object call fnc_vehicleEventHandler;
+ //Updated object position if moved
+ if (!_wsDone) then {
+ [_object, "position"] call server_updateObject;
+ };
};
//Monitor the object
@@ -187,34 +221,6 @@ if (_script != "") then
// # END OF STREAMING #
-//Set the Time
- //Send request
- _key = "CHILD:307:";
- _result = _key call server_hiveReadWrite;
- _outcome = _result select 0;
- if(_outcome == "PASS") then {
-
- _date = _result select 1;
- //date setup
- _year = _date select 0;
- _month = _date select 1;
- _day = _date select 2;
- _hour = _date select 3;
- _minute = _date select 4;
-
- //Force full moon nights
- _date = [2012,6,6,_hour,_minute];
-
- if(isDedicated) then {
- //["dayzSetDate",_date] call broadcastRpcCallAll;
- setDate _date;
- dayzSetDate = _date;
- publicVariable "dayzSetDate";
- };
-
- diag_log ("HIVE: Local Time set to " + str(_date));
- };
-
// Spawn custom buildings
_cfgLocations = configFile >> "CfgChernarusRedux";
@@ -273,8 +279,8 @@ allowConnection = true;
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
//Randomize spawn chance, it may be a little cruel with a randomized amount but let's try it...
-private ["_random"];
+//private ["_random"];
_random = ceil(random 6) + 4; //Minimum of 40%
nul = [3, 4, (50 * 60), (15 * 60), _random/10, 'center', 4000, true, false] spawn server_spawnCrashSite;
-//nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
+//nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
\ No newline at end of file
diff --git a/MPMissions/dayz_1.chernarus/init.sqf b/MPMissions/dayz_1.chernarus/init.sqf
index 0ec4653..34746b9 100644
--- a/MPMissions/dayz_1.chernarus/init.sqf
+++ b/MPMissions/dayz_1.chernarus/init.sqf
@@ -11,7 +11,7 @@ dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;
-//Define first person settings. Leave commented out to disable this feature or when using difficulty to disable third person
+//Define first person settings. Set 0 to disable this feature or when using difficulty to disable third person
//FPOnly = 0; disables this feature.
//FPOnly = 1; is First Person only in vehicles.
//FPOnly = 2; is First Person only on foot.
diff --git a/README.md b/README.md
index 52c861e..3093a1b 100644
--- a/README.md
+++ b/README.md
@@ -1,58 +1,6 @@

A variant of DayZ Mod intended to be more brutal and unforgiving.
-Changelog
----------
-
-***** Most changes from 1.7.6.1 are in the update without notice, since the code was updated to 1.7.6.1 *****
-
-- [Change] All skins now have a bandit and survivor variant, excluding bait runner.
-- [Change] Zombies are ridiculous.
-- [Change] The M24 is now the M40A3.
-- [Change] Main rotor parts chance reduced.
-- [Change] Debug warning if you are less than 500M away from debug, skull and crossbones icon.
-- [Change] Helicopter wrecks will spawn at random intervals, not immediately.
-- [Change] Added randomized (max of 10) number of wrecks per restart.
-- [Change] Players in moving closed vehicles > 10 KPH cannot be hurt by zombies
-- [Change] Since zombies can hit helicopters when they are not even close, or an object/wall is in the way, players cannot be hurt by zeds in helicopters.
-
-------
-
-- [Fix] You may now eat and drink in vehicles
-- [Fix] Duplication by "take" action to pick up objects
-- [Fix] Ammo refill on relog.
-- [Fix] Other duplication methods.
-
-------
-
-- [new] Simple benefits of clothing, I.e. insulation, waterproofing, wind resistance etc.
-- [New] SA58V-Acog
-- [New] SA58V-CCO
-- [New] SA58P
-- [New] Criminal (uniform), police (uniform) and bait runner skins.
-- [New] You cannot eat or drink uncooked food or water while infected.
-- [New] Hive extension instead of Bliss, mainly since bliss is no longer updated by its developer.
-- [New] Server admins may use the Hive extension to change time settings on their server, link multiple servers etc.
-
-------
-
-- [Removed] New and host server buttons.
-
-------
-
-Notable 1.7.6.1 changes implemented
-- [Vanilla] Added new backpack variants
-- [Vanilla] Combat roll
-- [Vanilla] Updated UI
-- [Vanilla] Shake and cough when infected.
-- [Vanilla] Zombie changes
-- [Vanilla] Machete added
-- [Vanilla] Wild zombie spawns
-- [Vanilla] Melee weapon ammo reload fix
-- [Vanilla] Loot models, i.e. compass is a compass not a bag in a loot pile anymore.
-
-- [Note] The loot table/chances has not been changed aside from the above changes.
-
Prerequisites
-------------
diff --git a/cfgdayz/BattlEye/addmagazinecargo.txt b/cfgdayz/BattlEye/addmagazinecargo.txt
index 2f459ad..7b1d021 100644
--- a/cfgdayz/BattlEye/addmagazinecargo.txt
+++ b/cfgdayz/BattlEye/addmagazinecargo.txt
@@ -28,7 +28,6 @@
5 ="5Rnd_127x99_as50"
5 ="5Rnd_86x70_L115A1"
5 ="64Rnd_9x19_Bizon"
-5 ="64Rnd_9x19_SD_Bizon"
5 ="6Rnd_HE_M203"
5 ="75Rnd_545x39_RPK"
5 ="8Rnd_9x18_MakarovSD"
diff --git a/cfgdayz/BattlEye/addweaponcargo.txt b/cfgdayz/BattlEye/addweaponcargo.txt
index 8c492de..fb17c4f 100644
--- a/cfgdayz/BattlEye/addweaponcargo.txt
+++ b/cfgdayz/BattlEye/addweaponcargo.txt
@@ -22,8 +22,7 @@
5 ="BAF_L86A2_ACOG"
5 ="BAF_LRR_scoped"
5 ="BAF_LRR_scoped_W"
-5 ="bizon"
-5 ="bizon_silenced"
+5 ="bizon" !="bizon_silenced"
5 ="DMR"
5 ="FN_FAL_ANPVS4"
5 ="G36a"
@@ -66,4 +65,11 @@
5 ="SVD_des_EP1"
5 ="SVD_NSPU_EP1"
5 ="UZI_SD_EP1"
-5 ="LeeEnfield"
\ No newline at end of file
+5 ="LeeEnfield"
+5 "mg51"
+5 "trg42"
+5 "hecate2"
+5 "sapr_" !="sapr_aimpoint"
+5 "SG55" !="SG551_COMMANDO_LG97_AIM_CAMO" !="sg552_mp_aimpoint"
+5 "p226" !="p226"
+5 "p220" !="p220"
\ No newline at end of file
diff --git a/cfgdayz/BattlEye/createvehicle.txt b/cfgdayz/BattlEye/createvehicle.txt
index e7ef102..ec3c700 100644
--- a/cfgdayz/BattlEye/createvehicle.txt
+++ b/cfgdayz/BattlEye/createvehicle.txt
@@ -1,5 +1,6 @@
-1 "" !="WeaponHolder" !="TinCan" !="Rabbit" !="Goat" !="WildBoar" !="Sheep" !="Hen" !="Cow01" !="Cow02" !="Cow03" !="Cow04" !="zZambie_Base" !="z_hunter" !="z_teacher" !="z_doctor" !="z_suit1" !="z_suit2" !="z_worker1" !="z_worker2" !="z_worker3" !="z_villager1" !="z_villager2" !="z_villager3" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !="z_policeman" !="z_priest" !="BoltSteelF" !="Land_Fire_DZ" !="SodaCan" !="JackDaniels" !="RoadFlare" !="ChemRed" !="ChemBlue" !="ChemGreen" !="S1_RX" !="S2_RX" !="S3_RX" !="SW2_RX" !="B1_RX" !="CZ_VestPouch_EP1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="DZ_ALICE_Pack_EP1" !="SmokeShell" !="SmokeShellRed" !="SmokeShellGreen" !="MedBox0" !="C1_RX" !="A1_RX" !="DZ_Backpack_EP1" !="G1_RX" !="DZ_Assault_Pack_EP1" !="BW1_RX" !="G_40mm_HE" !="dog" !="WeaponHolder_MeleeCrowbar" !="WeaponHolder_ItemHatchet" !="WeaponHolder_PartGeneric" !="WeaponHolder_ItemJerrycan" !="WeaponHolder_PartFueltank" !="WeaponHolder_PartGlass" !="WeaponHolder_PartEngine" !="WeaponHolder_PartWheel" !="WeaponHolder_PartVRotor" !="WeaponHolder_ItemCrowbar" !="WeaponHolder_ItemTent" !="WeaponHolder_ItemStorageBox" !="Logic"
-5 "SeaGull"
+1 "" !"medbawx0" !="WeaponHolder" !="Fort_EnvelopeSmall" !="GraveCrossHelmet_EP1" !="TinCan" !="Rabbit" !="Goat" !="WildBoar" !="Sheep" !="Hen" !="Cow01" !="Cow02" !="Cow03" !="Cow04" !="DZ_Czech_Vest_Puch" !="zZambie_Base" !="z_hunter" !="z_teacher" !="z_doctor" !="z_suit1" !="z_suit2" !="z_worker1" !="z_worker2" !="z_worker3" !="z_villager1" !="z_villager2" !="z_villager3" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !="z_policeman" !="z_priest" !="BoltSteelF" !="Land_Fire_DZ" !="SodaCan" !="JackDaniels" !="RoadFlare" !="ChemRed" !="ChemBlue" !="ChemGreen" !="S1_RX" !="S2_RX" !="S3_RX" !="SW2_RX" !="B1_RX" !="CZ_VestPouch_EP1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="DZ_ALICE_Pack_EP1" !="SmokeShell" !="SmokeShellRed" !="SmokeShellGreen" !="MedBox0" !="CS1_RX" !="BR1_RX" !="A1_RX" !="PS1_RX" !="GS1_RX" !="GB1_RX" !="PB1_RX" !="CB1_RX" !="DZ_Backpack_EP1" !="DZ_Assault_Pack_EP1" !="BW1_RX" !="G_40mm_HE" !="dog" !="WeaponHolder_MeleeCrowbar" !="WeaponHolder_ItemHatchet" !="WeaponHolder_PartGeneric" !="WeaponHolder_ItemJerrycan" !="WeaponHolder_PartFueltank" !="WeaponHolder_PartGlass" !="WeaponHolder_PartEngine" !="WeaponHolder_PartWheel" !="WeaponHolder_PartVRotor" !="WeaponHolder_ItemCrowbar" !="WeaponHolder_ItemTent" !="WeaponHolder_ItemStorageBox" !="Logic"
+5 "SeaGull" //ignore
+//ignore
5 "box" !="AmmoBoxSmall_762_556_545" !="ItemMatchbox" !="ItemToolbox" !="CardBoardBox" !="FoodBox1" !="FoodBox2" !="FoodBox3" !="WeaponHolder_ItemStorageBox"
5 "Mine"
5 "ARTY_"
@@ -32,7 +33,6 @@
5 "_GRAD"
5 "_SABOT"
5 "_SH"
-5 "KORD"
5 "DSHKM"
5 "MK19"
5 "AGS"
@@ -51,21 +51,145 @@
1 "dog" //until released not welcome
5 "Land_" !="Land_Fire_DZ" !"Land_Cont2_RX" !"Land_Mag_RX"
5 "BBarracks"
-1 "_ep1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="CZ_VestPouch_EP1" !="DZ_ALICE_Pack_EP1" !="DZ_Backpack_EP1" !="DZ_Assault_Pack_EP1"
+1 "_ep1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="CZ_VestPouch_EP1" !="DZ_ALICE_Pack_EP1" !="DZ_Backpack_EP1" !="DZ_Assault_Pack_EP1" !="GraveCrossHelmet_EP1"
1 "_baf"
1 "_pmc"
1 "cz_" !="CZ_VestPouch_EP1"
5 "_LHD_
5 "_acr"
5 "MASH_"
-5 "Fort_"
+5 "Fort_" !="Fort_EnvelopeSmall"
5 "BasicWeapons"
5 "SpecialWeapons"
5 "BAF_"
-5 "Fort_"
5 "Hanged_MD"
5 "Bleacher_EP1"
5 "SUV_"
5 "Warfare"
5 "PipeBomb"
-1 "Medbawx0"
\ No newline at end of file
+5 "ParachuteC"
+5 "Hanged"
+5 "GBU"
+5 "C130J"
+5 "UH1Y"
+5 "A10"
+5 "UH1H_DZ"
+5 "F35" !"#0" //prevent kicks for player with F35 in guid
+5 "AS50"
+5 "TWS"
+5 "M1A1"
+5 "M1A2"
+5 "RU_WarfareBBarracks"
+5 "RUVehicleBox"
+5 "Land_HBarrier_large"
+5 "USMC_WarfareBBarracks"
+5 "Land_Fort_Watchtower"
+5 "Rocket_DZ"
+5 "Dog"
+5 "Fin"
+5 "SmokeShellPurple"
+5 "Hanged_MD"
+5 "_LHD_"
+5 "LaserTarget"
+5 "Count Restriction" //ignore
+//ignore
+5 "Bleacher_EP1"
+5 "SUV_"
+5 "Warfare"
+5 "TK_INS_Soldier_EP1"
+5 "AH1Z"
+5 "CDF_Soldier"
+5 "su25"
+5 "GAU"
+5 "lightpoint"
+5 "LandRover"
+5 "PBX"
+5 "particlesource"
+5 "An2_"
+5 "CH_47"
+5 "L39_"
+5 "Mi17_"
+5 "Mi24"
+5 "MQ9"
+5 "Chukar"
+5 "AV8B"
+5 "Ka52"
+5 "CruiseMissile"
+5 "MH60S"
+5 "MV22"
+5 "Pchela1T"
+5 "BMP2_"
+5 "M113"
+5 "M2A2"
+5 "M2A3"
+5 "M6_EP1"
+5 "T34_"
+5 "T55_"
+5 "T72_"
+5 "T90"
+5 "ZSU"
+5 "BRDM2"
+5 "BTR"
+5 "Lada"
+5 "Ikarus"
+5 "M1030"
+5 "M1126"
+5 "M1128"
+5 "M1129"
+5 "M1130"
+5 "M1133"
+5 "M1135"
+5 "Mtvr"
+5 "Offroad"
+5 "SPG9"
+5 "AGS30"
+5 "_MG_"
+5 "Ural"
+5 "UAZ_"
+5 "V3S_"
+5 "ZU23"
+5 "Volha"
+5 "GAZ_"
+5 "HMMWV"
+5 "Kamaz"
+5 "LAV25"
+5 "MMT_"
+5 "_PK_"
+5 "Skoda"
+5 "TT650"
+5 "TowingTractor"
+5 "VWGolf"
+5 "car_sedan"
+5 "datsun"
+5 "hilux"
+5 "Fishing_Boat"
+5 "smallboat"
+5 "ATV_"
+5 "_bike_"
+5 "ParachuteBase"
+5 "M2StaticMG"
+5 "KORD"
+5 "InsertVehicleNameHere"
+5 "_AA_"
+5 "CDF_WarfareBMGNest_PK"
+5 "GUE_WarfareBFieldhHospital"
+5 "UH60"
+5 "HeliH"
+5 "AW159_Lynx_BAF"
+5 "MASH_EP1"
+5 "ZavoraAnim"
+5 "Stinger_Pod"
+5 "76n6ClamShell"
+5 "searchlight"
+5 "_light"
+5 "Misc_"
+5 "Base_"
+5 "PowGen_Big"
+5 "FoldChair"
+5 "GunrackUS_EP1"
+5 "launchers"
+5 "US_Backpack_EP1"
+5 "BAF_AssaultPack_ARAmmo"
+5 "ClutterCutter_EP1"
+5 "jackal"
+5 "FV510"
\ No newline at end of file
diff --git a/cfgdayz/BattlEye/scripts.txt b/cfgdayz/BattlEye/scripts.txt
index 7171259..9efe541 100644
--- a/cfgdayz/BattlEye/scripts.txt
+++ b/cfgdayz/BattlEye/scripts.txt
@@ -1,8 +1,8 @@
1 addAction !"\z\addons\dayz_code\actions\" !"\"addAction\"," !"_action1 = _unit addAction [localize \"str_actions_medical_01" !"s_player_grabflare = player addAction [format[localize \"str_actions_medical_15\",_te" !"raddAction = 'addAction'" !"raddActioncode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addAction.sqf')" !"null = _holder addAction [format[(localize \"STR_DAYZ_CODE_1\"),_name], \"\z\addons\dayz_code\actions\object_pickup.sqf\"," !"NORRN_dropAction = player addAction [\"Drop body\", \"\z\addons\dayz_code\medical\drop_body.sqf\",_dragee, 0, false, true];" !"s_player_dropflare = player addAction [format[localize \"str_actions_medical_16\",_text],"
1 addEventHandler !"\"addEventHandler" !"displayAddEventHandler" !"ctrlAddEventHandler" !"raddEventhandler = 'addEventhandler'" !"raddEventhandlercode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addEventhandler.sqf')" !"id = _unit addeventhandler [\"HandleDamage\",{_this call local_zombieDamage}];" !"id = _unit addeventhandler [\"Killed\",{[_this,\"zombieKills\"] call local_eventKill}];" !"eh1 = _unit addeventhandler [\"HandleDamage\",{if (local (_this select 0)) then {_this call fnc_usec_damageVehicle}}];" !"eh2 = _unit addeventhandler [\"Killed\",{if (local (_this select 0)) then {_this call object_vehicleKilled}}];" !"eh3 = _unit addEventHandler [\"GetOut\", {[(_this select 0),"position"] call server_updateObject;}];" !"eh1 = _unit addeventhandler [\"HandleDamage\",{_this call fnc_usec_damageHandler;0} ];" !"eh2 = _unit addEventHandler [\"Fired\", {_this call player_fired;}];" !"eh3 = _unit addEventHandler [\"Killed\", {_id = [] spawn player_death;}];" !"_id = player addEventHandler [\"Respawn\", {_id = [] spawn player_death;}];" !"dayz_originalPlayer = _oldUnit;\n_oldUnit addEventHandler [\"HandleDamage\",{false}];\n_oldUnit disableAI \"ANIM\";" !"_timeN = time;\n\n_id = _agent addeventhandler [\"HandleDamage\",{_this call local_zombieDamage}];" !"eh_player_killed = player addeventhandler [\"FiredNear\",{_this call player_weaponFiredNear;} ];"
-1 displayAddEventHandler !"\"displayAddEventHandler\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call dayz_spaceInterrupt\"];\nplayer disableConversation"
+1 displayAddEventHandler !"\"displayAddEventHandler\"," !"[\"KeyDown\",\"_this call dayz_spaceInterrupt\"]" !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call dayz_spaceInterrupt\"];\nplayer disableConversation"
5 addGroupIcon !"\"addGroupIcon\","
-1 addPublicVariableEventHandler !"\"addPublicVariableEventHandler\"," !"DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"remExField" addPublicVariableEventHandler {_this call BIS_MPF_remoteExecution" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select" !"\"drn_DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select"
+1 addPublicVariableEventHandler !"\"addPublicVariableEventHandler\"," !"DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"remExField" addPublicVariableEventHandler {_this call BIS_MPF_remoteExecution" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select" !"\"drn_DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select"
1 addRating !"\"addRating\","
1 addResources !"\"addResources\","
1 addSwitchableUnit !"\"addSwitchableUnit\"," !"addSwitchableUnit _newUnit;" !"addSwitchableUnit dayz_originalPlayer;"
@@ -18,10 +18,10 @@
1 createUnit !"\"createUnit\"," !"BIS_MPF_logic = BIS_MPF_dummygroup createUnit [" !"_newUnit = _group createUnit [_class,dayz_spawnPos,[],0,\"NONE\"]" !"_group = createGroup _center;\ncl_gamelogic = _group createUnit [\"LOGIC\", [0, 0, 0], [], 0, \"NONE\"];"
5 createMine !"\"createMine\","
5 createTarget !"\"createTarget\","
-5 createVehicle !"\"createVehicle\"," !"Land_Cont_RX" !"Land_Cont2_RX" !"Land_Mag_RX" !"_bolt = createVehicle [\"WoodenArrowF\"" !"_item = createVehicle [\"WeaponHolder\"" !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];r;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;" !"_pos = getposATL _obj;\nsleep 3;\n\n\n_bag = createVehicle [\"WeaponHolder_ItemStorageBox\",_pos"
+5 createVehicle !"Fort_EnvelopeSmall" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 1," !"GraveCrossHelmet_EP1" !"Land_Cont_RX" !"Land_Cont2_RX" !"Land_Mag_RX" !"_bolt = createVehicle [\"WoodenArrowF\"" !"_item = createVehicle [\"WeaponHolder\"" !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];r;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;" !"_pos = getposATL _obj;\nsleep 3;\n\n\n_bag = createVehicle [\"WeaponHolder_ItemStorageBox\",_pos"r_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"];r;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;" !"_pos = getposATL _obj;\nsleep 3;\n\n\n_bag = createVehicle [\"WeaponHolder_ItemStorageBox\",_pos"
5 createVehicleLocal !"\"createVehicleLocal\"," !"_point = \"Logic\" createVehicleLocal getPosATL _unit;" !"_object = _type createVehicleLocal _position;" !"_fl = \"#particlesource\" createVehicleLocal getpos _v;" !"_lightArea = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_lightSpark = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_source = \"#particlesource\" createVehicleLocal getpos (_this select 0);" !"_source = \"#particlesource\" createVehicleLocal _pos;\n_source setParticleParams" !"_smoke = \"#particlesource\" createVehicleLocal _pos;\n_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];" !"_Crater= \"CraterLong\" createvehiclelocal [_pos select 0, _pos select 1, 0];\n_Crater setdir (_dir + (180 * _i));" !"_particle = \"#particlesource\" createVehicleLocal _ObjectPos;" !"if (_debug) then \n{\n_source = \"#particlesource\" createVehicleLocal position player;\n_source setDropInterval 0.1;"
1 disableUserInput !"\"disableUserInput\"," !"disableUserInput false;"
-1 enableSimulation !"\"enableSimulation\"," !"0 cutText [\"\", \"BLACK IN\",3]" !"progressLoadingScreen" !"DEBUG: loadscreen guard ended" !"renablesimulation = 'enablesimulation'" !"renablesimulationcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'enablesimulation.sqf')" !"this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this" !"dayz_originalPlayer enableSimulation true;" !">> \"dayz_anim\" >> \"isUpdated\");\nplayer enableSimulation true;" !"isUpdated\");\n\n\n\nplayer allowDamage false;\n\nplayer enableSimulation true;" !"\"CfgPatches\" >> \"dayz_anim\" >> \"isUpdated\");\n\n\n\nplayer enableSimulation true;"
+1 enableSimulation !"isUpdated" !"endMission \"END6\";" !"\"enableSimulation\"," !"0 cutText [\"\", \"BLACK IN\",3]" !"progressLoadingScreen" !"DEBUG: loadscreen guard ended" !"renablesimulation = 'enablesimulation'" !"renablesimulationcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'enablesimulation.sqf')" !"this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this" !"dayz_originalPlayer enableSimulation true;" !">> \"dayz_anim\" >> \"isUpdated\");\nplayer enableSimulation true;" !"isUpdated\");\n\n\n\nplayer allowDamage false;\n\nplayer enableSimulation true;" !"\"CfgPatches\" >> \"dayz_anim\" >> \"isUpdated\");\n\n\n\nplayer enableSimulation true;"
1 ctrlSetEventHandler !"\"ctrlSetEventHandler\"," !"_menu ctrlSetText format[_type,_name];\n_menu ctrlSetEventHandler [\"ButtonClick\",_compile];"
1 ctrlAddEventHandler !"\"ctrlAddEventHandler\","
1 displayAddEventHandler !"\"displayAddEventHandler\"," !"dayz_lastCheckBit = 0;\n\n(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call dayz_spaceInterrupt\"];"
@@ -33,12 +33,12 @@
1 publicVariable !"\"publicVariable\"," !"publicVariableClient" !"publicVariableServer" !"addPublicVariableEventHandler" !"publicVariable \"dayzDiscoRem\";" !"publicVariable \"dayzPlayerSave\";" !"publicVariable _playerObjName;" !"publicVariable \"BIS_MPF_logic\";" !"publicVariable \"usecEpi\";" !"publicVariable \"remExFP\";" !"publicVariable \"dayzLogin\";" !"publicVariable \"dayzLogin2\";" !"publicVariable \"dayzHitV\";" !"publicVariable \"dayzUpdateVehicle\";" !"usecBandage = [_unit,player];\npublicVariable \"usecBandage\";" !"usecBandage = [player,player];\npublicVariable \"usecBandage\";\nplayer setdamage 0;" !"usecBleed = [_unit,_wound,_hit];\npublicVariable \"usecBleed\";" !"usecBleed = [player,_x,0];\npublicVariable \"usecBleed\";\n} forEach (_medical select 8);" !"usecBleed = [_playerObj,_x,0];\npublicVariable \"usecBleed\";\n} forEach (_medical select 8);" !"dayzRoadFlare = [_projectile,0];\npublicVariable \"dayzRoadFlare\";\n_id = _this spawn player_throwObject;" !"dayzHideBody = _item;\npublicVariable \"dayzHideBody\";\nhideBody _item;\" hideBody _item;" !"usecTransfuse = [_unit,player];\npublicVariable \"usecTransfuse\";" !"player removeMagazine \"ItemMorphine\";\n\nusecMorphine = [_unit,player];\npublicVariable \"usecMorphine\";" !"usecMorphine = [player,player];\npublicVariable \"usecMorphine\";\nplayer setVariable [\"USEC_inPain\", false, true];" !"dayzSetFix = [_vehicle,_selection,0];\npublicVariable \"dayzSetFix\";" !"dayzSetFuel spawn local_sefFuel;\npublicVariable \"dayzSetFuel\";" !"usecPainK = [_unit,player];\npublicVariable \"usecPainK\";" !"dayzGutBody = _array;\npublicVariable \"dayzGutBody\";" !"dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName];\npublicVariable \"dayzDeath\";" !"publicVariable "dayzPublishObj";\nif (isServer) then {\ndayzPublishObj call server_publishObj;\n};"
1 publicVariableClient !"\"publicVariableClient\"," !"_clientID publicVariableClient \"dayzPlayerLogin\";"
1 publicVariableServer !"\"publicVariableServer\"," !"dayzKiller" !"publicVariableServer \"atp\";" !"publicVariableServer \"dayzPlayerSave\";" !"publicVariableServer \"dayzDiscoRem\";" !"publicVariableServer \"dayzLogin\";" !"publicVariableServer \"dayzLoginRecord\";" !"publicVariableServer \"dayzCharDisco\";\nif (isServer) then {\n\ndayzCharDisco call server_characterSync;" !="publicVariableServer \"dayz_logDamage\";" !"publicVariableServer \"dayzUpdateVehicle\";" !"publicVariableServer \"dayzDeath\";\nif (isServer) then {\n_id = dayzDeath spa" !"dayzDeleteObj = [_objectID,_objectUID];\npublicVariableServer \"dayzDeleteObj\";\nif (isServer) then {\ndayzDeleteObj" !"publicVariableServer \"dayzPublishObj\";\nif (isServer) then {\ndayzPublishObj" !="setDamage 2;\n\ndayzDeleteObj = [_objectID,_objectUID];\npublicVariableServer \"dayzDeleteObj\";"
-1 removeAllEventHandlers !"\"removeAllEventHandlers\"," !"dayzDeleteObj call local_deleteObj;\n};\n\n_unit removeAllEventHandlers \"HandleDamage\";\n_unit removeAllEventHandlers \"Killed"
+1 removeAllEventHandlers !"\"removeAllEventHandlers\"," !"dayzUpdateVehicle" !"dayzDeleteObj call local_deleteObj;\n};\n\n_unit removeAllEventHandlers \"HandleDamage\";\n_unit removeAllEventHandlers \"Killed"
1 sendTask !"\"sendTask\","
1 serverCommand !"\"serverCommand\"," !"serverCommandAvailable"
1 serverCommandAvailable !"\"serverCommandAvailable\","
1 setCurrentTask !"\"setCurrentTask\"," !"rsetCurrentTask = 'setCurrentTask'" !"rsetCurrentTaskcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'setCurrentTask.sqf')" !"rsetCurrentTaskArrays = 'setCurrentTaskArrays'" !"rsetCurrentTaskArrayscode = compile PreprocessFile (BIS_PathMPscriptCommands + 'setCurrentTaskArrays"
-5 setDamage !"\"setDamage\"," !"_ent setDamage 2;" !"_vehicle setDamage 0;" !"player setdamage 0;" !"if (alive player) then { player SetDamage 1;};" !"if (_ent isKindOf \"Animal\") then {\n_ent setDamage 1;" !"player setDamage 1;\n0.1 fadeSound 0;" !"(vehicle _x) setDamage 1;\n_x setDamage 1;\n};" !"if (!_isSync) then {\n_veh allowDamage true;\n_veh setDamage 1;\nplayer setDamage 1;\n};" !"if (!_isSync) then {\n_vehicle allowDamage true;\n_vehicle setDamage 1;\n_character setVelocity [0,0,100];\n};" !"_object setdir _dir;\n_object setDamage _damage;" !"if (!(_group in _groups)) then {_groups set [count _groups,_group];};\n_x setDamage 1;\n};
+5 setDamage !"\"setDamage\"," !="if ((alive player) && (r_fracture_legs)) then { player SetDamage 1;};"!"_ent setDamage 2;" !"_vehicle setDamage 0;" !"player setdamage 0;" !"if (alive player) then { player SetDamage 1;};" !"if (_ent isKindOf \"Animal\") then {\n_ent setDamage 1;" !"player setDamage 1;\n0.1 fadeSound 0;" !"(vehicle _x) setDamage 1;\n_x setDamage 1;\n};" !"if (!_isSync) then {\n_veh allowDamage true;\n_veh setDamage 1;\nplayer setDamage 1;\n};" !"if (!_isSync) then {\n_vehicle allowDamage true;\n_vehicle setDamage 1;\n_character setVelocity [0,0,100];\n};" !"_object setdir _dir;\n_object setDamage _damage;" !"if (!(_group in _groups)) then {_groups set [count _groups,_group];};\n_x setDamage 1;\n};
5 setDammage !"\"setDammage\","
5 setDate !"\"setDate\"," !"rsetDate = 'setDate'" !"rsetDatecode = compile PreprocessFile (BIS_PathMPscriptCommands + 'setDate.sqf')" !"dayzSetDate" !="[\"dayzSetDate\", { setDate (_this select 1); } ] call registerBroadcastRpc;" !"if(isDedicated) then {\nsetDate _date;\ndayzSetDate = _date;\npublicVariable \"dayzSetDate\";\n};
5 setFog !"\"setFog\"," !"0 setOvercast _currentOvercast;\n0 setFog _currentFog;" !"if (_currentWeatherChange == \"FOG\") then {\n_timeUntilCompletion setFog _targetWeatherValue;\n};" !"0 setFog _initialFog;\n\nif (_initialOvercast == -1) then {"
@@ -110,7 +110,7 @@
1 clearWeaponCargo !"\"clearWeaponCargo\"," !"clearWeaponCargoGlobal" !"rclearWeaponCargo = 'clearWeaponCargo'" !"rclearWeaponCargocode = compile PreprocessFile (BIS_PathMPscriptCommands + 'clearWeaponCargo.sqf')"
1 clearWeaponCargoGlobal !"\"clearWeaponCargoGlobal\"," !_mags = getMagazineCargo _firePlace;\nclearMagazineCargoGlobal _firePlace;\nclearWeaponCargoGlobal _firePlace;"
5 onDoubleClick !"\"onDoubleClick\","
-5 addWeapon !"\"addWeapon\"," !"addWeaponPool" !"addWeaponCargo" !"addWeaponCargoGlobal" !"player addWeapon \"Loot\";" !"player addWeapon \"Flare\";" !"raddWeapon = 'addWeapon'" !"raddWeaponcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeapon.sqf')" !"raddWeaponCargocode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeaponCargo.sqf')" !"if (_isOK) then {\nplayer addWeapon _x;\n};\n} forEach _wpns;\n};" !"if (_item == (configfile >> \"cfgweapons\" >> (configName _item))) then {_unit addWeapon configName _item;};" !"if (isClass (configfile >> \"cfgweapons\" >> (_item))) then {_unit addWeapon _item;}"
+5 addWeapon !"\"addWeapon\"," !"(_type == \"cfgWeapons\")" !"addWeaponPool" !"addWeaponCargo" !"addWeaponCargoGlobal" !"player addWeapon \"Loot\";" !"player addWeapon \"Flare\";" !"raddWeapon = 'addWeapon'" !"raddWeaponcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeapon.sqf')" !"raddWeaponCargocode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeaponCargo.sqf')" !"if (_isOK) then {\nplayer addWeapon _x;\n};\n} forEach _wpns;\n};" !"if (_item == (configfile >> \"cfgweapons\" >> (configName _item))) then {_unit addWeapon configName _item;};" !"if (isClass (configfile >> \"cfgweapons\" >> (_item))) then {_unit addWeapon _item;}"
5 addWeaponPool !"\"addWeaponPool\","
5 addWeaponCargo !"\"addWeaponCargo\"," !"addWeaponCargoGlobal" !"raddWeaponCargo = 'addWeaponCargo'" !"raddWeaponCargocode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeaponCargo.sqf')"
5 addWeaponCargoGlobal !"\"addWeaponCargoGlobal\"," !"_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];" !"dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];" !"if (_bcpkWpn != \"\") then {\ndayz_myBackpack addWeaponCargoGlobal [_bcpkWpn,1];\n};\n};" !"if (_iItem != \"\") then {\n_item addWeaponCargoGlobal [_iItem,1];\n};" !"Weapons\" >> _iItem;\nif (isClass _conf) then {\n_item addWeaponCargoGlobal [_iItem,1];\n} else {"
@@ -125,19 +125,19 @@
1 limitSpeed !"\"limitSpeed\","
1 setOwner !"\"setOwner\","
5 "rspawn" !"_nearSpawnPos" !"rspawn = 'spawn'" !"rspawncode = compile PreprocessFile (BIS_PathMPscriptCommands + 'spawn.sqf')" !"rspawncode"
-1 deleteVehicle !"\"deleteVehicle\"," !"dayz_flyMonitor = dayz_flyMonitor - [_x];\ndeleteVehicle _x;" !"deleteVehicle _x;\ndayz_bodyMonitor set [_cursor,\"DEL\"];" !"sleep 5;\n};\n{deleteVehicle _x;} forEach _items;" !"sleep 1;\n};\ndeleteVehicle _source;\ndeleteVehicle _point;" !"if (_nearByPlayer) then {\ndeleteVehicle _agent;\n};" !"_object = nearestObject [_position,_type];\ndeleteVehicle _object;" !"_oldUnit disableAI \"MOVE\";\n} else {\ndeleteVehicle _oldUnit;\n};" !"{deleteVehicle _x} forEach _nearByObj;\n_x setVariable [\"cleared\",true,true];" !"dayzDeleteObj call local_deleteObj;\n};\n deleteVehicle _obj;" !"player addWeapon \"Flare\";\n\nsleep 0.1;\ndeleteVehicle _old;" !"if (local _unit) then {\ndeleteVehicle _unit;" !"};\ndeleteVehicle _lightArea;\ndeleteVehicle _lightSpark;" !"waitUntil{!(alive _flare)};\ndeleteVehicle _lightSpark;" !"if (!isNull _tent) then {\nif (local _tent) then {deleteVehicle _tent};" !"hideBody _item;\nsleep 10;\ndeleteVehicle _item;" !"sleep 5;\ndeleteVehicle _agent;" !"dayzDeleteObj call local_deleteObj;\n};\n\ndeleteVehicle _obj;" !"deleteVehicle _object;\nr_action = false;\ncall fnc_usec_medic_removeActions;" !"if (_isOk) then {\n deleteVehicle _holder;" !"_flare = _this select 3;\ndeleteVehicle _flare;" !"dayz_hasFire = objNull;\ndeleteVehicle _obj;" !"deleteVehicle _object;\n\n_weapon = _classname createVehicle _location;" !"if (!isNull _agent) then {\ndeleteVehicle _agent;" !"{deleteVehicle _x} forEach _zombies;" !"deleteVehicle _agent;\n} else {\ndayz_bodyMonitor set" !"deleteVehicle _x;\n_delQtyZ = _delQtyZ + 1;" !"if (!(isNull _sfx)) then {\ndeleteVehicle _sfx;\n};" !"deleteVehicle _body;\n_delQtyP = _delQtyP + 1;\n};" !"_dwUSOFC=_dwUSOFC+1;\ndeleteVehicle _x;" !"deleteVehicle _x;\n_dwUFPC=_dwUFPC+1;" !"deleteVehicle _x;\n};\n} forEach allMissionObjects \"ReammoBox\"" !"BIS_functions_mainscope]]; _mygrp = group (_this select 0); deleteVehicle (_this select 0); deleteGroup _mygrp;};};" !"if (_isOk) then {\ndeleteVehicle _holder;\nif (_classname in [\"MeleeHatchet\",\"MeleeCrowbar\"]) then {" !"if (_fade) then {_int=_int - 0.02 - rain/10;};\nsleep 3;\n};\n\ndeletevehicle _fl;" !"clearVehicleInit _v;\ndeletevehicle _fl;deletevehicle _sm;" !"deleteVehicle _smoke;\ndeleteVehicle _fire;\ndeleteVehicle _shards;\ndeleteVehicle _dirt;" !"if (_isOk) then {\ndeleteVehicle _holder;" !"_nearBy = _iPos2 nearObjects [\"ReammoBox\",1];\n{deleteVehicle _x} forEach _nearBy;" !"forEach magazines _oldUnit;\n\ndeleteVehicle _oldUnit;" !="elogic globalChat format[\"(COMBAT LOG) %1\",_playerName];\ndeleteVehicle cl_gamelogic;" !"_randomTime = random 2;\nSleep 8 + _randomTime;\ndeleteVehicle _particle;\n_randomTime = random 2;\nSleep _randomTime;\n};"
-1 compile !"\ca\communityconfigurationproject" !"ca\ui\scripts\ui_loadingTextCustom.sqf" !"BIS_CPP_Muzzle_Init" !"\"compile\"," !"\"z\addons\dayz_code\compile" !"call compile preprocessFileLineNumbers \"\z\addons\dayz_code" !"compile preprocessFileLineNumbers '\ca\modules\alice\data\scripts" !"compile preprocessFileLineNumbers '\ca\modules_e\alice2\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules\dyno\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules_e\gita\data\scripts" !"\"z\addons\dayz_code\init\compiles.sqf" !"_this call compile preprocessfilelinenumbers 'ca\ui\scripts\ui_loadingText.sqf';" !"_recompile" !"\"call compile format[\"\"player%1 = player;\"\",_playerUID];\"" !"call compile format[\"\"player%1 = player;\"\",_playerUID];" !"call compile format[\"player%1 = player;\",_playerUID];" !"'] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts" !"= compile preprocessFileLineNumbers 'ca\modules\function" !"'_dummy']; _dummy = [_this,'initDialog'] call compile preprocessFile '\ca\ui\scripts\handleGear.sqf'" !"BIS_MPF_remoteExecutionServer = compile preprocessFile (BIS_MP_Path + BIS_PATH_SQF + \"remExServer.sqf\");" !"compile preprocessFileLineNumbers \"\ca\Data\ParticleEffects\SCRIPTS" !"compile preprocessFile \"\ca\Data\ParticleEffects\SCRIPTS" !"compile PreprocessFile (BIS_PathMPscriptCommands" !"_code = call compile format[\"r%1code\",_targetScript];" !"compile (preprocessFileLineNumbers \"ca\characters_e\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules_e\functions" !"compile preprocessFileLineNumbers 'ca\modules_acr\functions" !"compile preprocessfilelinenumbers 'ca\missions_acr\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules_pmc\functions" !"compile preprocessFileLineNumbers 'ca\missions_ew\functions" !"call (compile \"deactivateKey (_keyString + (str _i))\");" !"if (isText (_class >> \"WeaponSlots\")) then \n{_slotsCode = getText (_class >> \"WeaponSlots\"); _slotsVar = call compile _slotsCode;}" !"_dummy = [_this, 'CA_VO_Init'] call compile preprocessFile '\ca\ui\scripts\HideVideoOptions.sqf';" !"['_dummy']; _dummy = [_this, \"CA_VO_ToggleAll\"] call compile preprocessfilelinenumbers \"\ca\ui\scripts\HideVideoOptions.sqf\";" !"['_dummy']; _dummy = [_this, \"CA_VO_ToggleAdvanced\"] call compile preprocessfilelinenumbers \"\ca\ui\scripts\HideVideoOptions.sqf\";" !"private [\"_amm\"];\n_amm=_this select 4;\n_this call (call compile GetText (configFile >> \"CfgAmmo\" >> _amm >> \"muzzleEffect\"));" !"['BIS_RscMiniMap',_this select 0]; _this call compile preprocessfilelinenumbers 'ca\ui\scripts\MiniMap.sqf';" !="private ['_dummy']; _dummy = [_this,'onload'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf';" !"for \"_xloop\" from 1 to 50 do\n{\n\nif (!isNil {(call compile format[\"BIS_dustEmitor_%1\", _xloop])}) then\n{\n_emitors" !"private ['_dummy']; _dummy = _this call compile preprocessFile 'pauseOnload.sqf';" !"[ _this select 0 , _this select 1 , 'List' ] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH." !"[ _this select 0, _this select 1, 'List' ] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH.sqf'"
+1 deleteVehicle !"\"deleteVehicle\"," !"player playActionNow \"PutDown\";" !"_nearBy = _iPos2 nearObjects [\"ReammoBox\",2];" !"dayzHideBody" !"dayzDeleteObj" !"dayz_flyMonitor = dayz_flyMonitor - [_x];\ndeleteVehicle _x;" !"deleteVehicle _x;\ndayz_bodyMonitor set [_cursor,\"DEL\"];" !"sleep 5;\n};\n{deleteVehicle _x;} forEach _items;" !"sleep 1;\n};\ndeleteVehicle _source;\ndeleteVehicle _point;" !"if (_nearByPlayer) then {\ndeleteVehicle _agent;\n};" !"_object = nearestObject [_position,_type];\ndeleteVehicle _object;" !"_oldUnit disableAI \"MOVE\";\n} else {\ndeleteVehicle _oldUnit;\n};" !"{deleteVehicle _x} forEach _nearByObj;\n_x setVariable [\"cleared\",true,true];" !"dayzDeleteObj call local_deleteObj;\n};\n deleteVehicle _obj;" !"player addWeapon \"Flare\";\n\nsleep 0.1;\ndeleteVehicle _old;" !"if (local _unit) then {\ndeleteVehicle _unit;" !"};\ndeleteVehicle _lightArea;\ndeleteVehicle _lightSpark;" !"waitUntil{!(alive _flare)};\ndeleteVehicle _lightSpark;" !"if (!isNull _tent) then {\nif (local _tent) then {deleteVehicle _tent};" !"hideBody _item;\nsleep 10;\ndeleteVehicle _item;" !"sleep 5;\ndeleteVehicle _agent;" !"dayzDeleteObj call local_deleteObj;\n};\n\ndeleteVehicle _obj;" !"deleteVehicle _object;\nr_action = false;\ncall fnc_usec_medic_removeActions;" !"if (_isOk) then {\n deleteVehicle _holder;" !"_flare = _this select 3;\ndeleteVehicle _flare;" !"dayz_hasFire = objNull;\ndeleteVehicle _obj;" !"deleteVehicle _object;\n\n_weapon = _classname createVehicle _location;" !"if (!isNull _agent) then {\ndeleteVehicle _agent;" !"{deleteVehicle _x} forEach _zombies;" !"deleteVehicle _agent;\n} else {\ndayz_bodyMonitor set" !"deleteVehicle _x;\n_delQtyZ = _delQtyZ + 1;" !"if (!(isNull _sfx)) then {\ndeleteVehicle _sfx;\n};" !"deleteVehicle _body;\n_delQtyP = _delQtyP + 1;\n};" !"_dwUSOFC=_dwUSOFC+1;\ndeleteVehicle _x;" !"deleteVehicle _x;\n_dwUFPC=_dwUFPC+1;" !"deleteVehicle _x;\n};\n} forEach allMissionObjects \"ReammoBox\"" !"BIS_functions_mainscope]]; _mygrp = group (_this select 0); deleteVehicle (_this select 0); deleteGroup _mygrp;};};" !"if (_isOk) then {\ndeleteVehicle _holder;\nif (_classname in [\"MeleeHatchet\",\"MeleeCrowbar\"]) then {" !"if (_fade) then {_int=_int - 0.02 - rain/10;};\nsleep 3;\n};\n\ndeletevehicle _fl;" !"clearVehicleInit _v;\ndeletevehicle _fl;deletevehicle _sm;" !"deleteVehicle _smoke;\ndeleteVehicle _fire;\ndeleteVehicle _shards;\ndeleteVehicle _dirt;" !"if (_isOk) then {\ndeleteVehicle _holder;" !"_nearBy = _iPos2 nearObjects [\"ReammoBox\",1];\n{deleteVehicle _x} forEach _nearBy;" !"forEach magazines _oldUnit;\n\ndeleteVehicle _oldUnit;" !="elogic globalChat format[\"(COMBAT LOG) %1\",_playerName];\ndeleteVehicle cl_gamelogic;" !"_randomTime = random 2;\nSleep 8 + _randomTime;\ndeleteVehicle _particle;\n_randomTime = random 2;\nSleep _randomTime;\n};"
+1 compile !"\ca\communityconfigurationproject" !"[_this,'initDialog'] call compile preprocessFile '\ca\ui\scripts\handleGear.sqf';" !"ca\ui\scripts\ui_loadingTextCustom.sqf" !"BIS_CPP_Muzzle_Init" !"\"compile\"," !"\"z\addons\dayz_code\compile" !"call compile preprocessFileLineNumbers \"\z\addons\dayz_code" !"compile preprocessFileLineNumbers '\ca\modules\alice\data\scripts" !"compile preprocessFileLineNumbers '\ca\modules_e\alice2\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules\dyno\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules_e\gita\data\scripts" !"\"z\addons\dayz_code\init\compiles.sqf" !"_this call compile preprocessfilelinenumbers 'ca\ui\scripts\ui_loadingText.sqf';" !"_recompile" !"\"call compile format[\"\"player%1 = player;\"\",_playerUID];\"" !"call compile format[\"\"player%1 = player;\"\",_playerUID];" !"call compile format[\"player%1 = player;\",_playerUID];" !"'] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts" !"= compile preprocessFileLineNumbers 'ca\modules\function" !"'_dummy']; _dummy = [_this,'initDialog'] call compile preprocessFile '\ca\ui\scripts\handleGear.sqf'" !"BIS_MPF_remoteExecutionServer = compile preprocessFile (BIS_MP_Path + BIS_PATH_SQF + \"remExServer.sqf\");" !"compile preprocessFileLineNumbers \"\ca\Data\ParticleEffects\SCRIPTS" !"compile preprocessFile \"\ca\Data\ParticleEffects\SCRIPTS" !"compile PreprocessFile (BIS_PathMPscriptCommands" !"_code = call compile format[\"r%1code\",_targetScript];" !"compile (preprocessFileLineNumbers \"ca\characters_e\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules_e\functions" !"compile preprocessFileLineNumbers 'ca\modules_acr\functions" !"compile preprocessfilelinenumbers 'ca\missions_acr\data\scripts" !"compile preprocessFileLineNumbers 'ca\modules_pmc\functions" !"compile preprocessFileLineNumbers 'ca\missions_ew\functions" !"call (compile \"deactivateKey (_keyString + (str _i))\");" !"if (isText (_class >> \"WeaponSlots\")) then \n{_slotsCode = getText (_class >> \"WeaponSlots\"); _slotsVar = call compile _slotsCode;}" !"_dummy = [_this, 'CA_VO_Init'] call compile preprocessFile '\ca\ui\scripts\HideVideoOptions.sqf';" !"['_dummy']; _dummy = [_this, \"CA_VO_ToggleAll\"] call compile preprocessfilelinenumbers \"\ca\ui\scripts\HideVideoOptions.sqf\";" !"['_dummy']; _dummy = [_this, \"CA_VO_ToggleAdvanced\"] call compile preprocessfilelinenumbers \"\ca\ui\scripts\HideVideoOptions.sqf\";" !"private [\"_amm\"];\n_amm=_this select 4;\n_this call (call compile GetText (configFile >> \"CfgAmmo\" >> _amm >> \"muzzleEffect\"));" !"['BIS_RscMiniMap',_this select 0]; _this call compile preprocessfilelinenumbers 'ca\ui\scripts\MiniMap.sqf';" !="private ['_dummy']; _dummy = [_this,'onload'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf';" !"for \"_xloop\" from 1 to 50 do\n{\n\nif (!isNil {(call compile format[\"BIS_dustEmitor_%1\", _xloop])}) then\n{\n_emitors" !"private ['_dummy']; _dummy = _this call compile preprocessFile 'pauseOnload.sqf';" !"[ _this select 0 , _this select 1 , 'List' ] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH." !"[ _this select 0, _this select 1, 'List' ] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH.sqf'"
1 exec !"\"exec\"," !"execVM" !"execFSM" !"JIPexec" !"_localExec" !"Init script executed at"
1 execVM !"\ca\communityconfigurationproject" !"\"execVM\"," !"execVM \"z\addons\dayz_code\medical\init_medical.sqf\"" !"execVM \"z\addons\dayz_code\external\DynamicWeatherEffects.sqf\"" !"execVM \"z\addons\dayz_code\medical\publicEH\load_wounded.sqf\"" !"execVM \"z\addons\dayz_code\medical\load\load_wounded.sqf\"" !"execVM \"z\addons\dayz_code\medical\publicEH\deadState.sqf\"" !"private [\"_dummy\"]; _dummy = [_this,\"onLBSelChanged\"] execVM \"\ca\ui\scripts\handleGear.sqf\";" !"private [\"_dummy\"]; _dummy = [_this,\"onLBListSelChanged\"] execVM \"\ca\ui\scripts\handleGear.sqf\";" !"private [\"_dummy\"]; _dummy = [_this,\"onKillFocus"] execVM \"\ca\ui\scripts\handleGear.sqf\";" !"private [\"_dummy\"]; _dummy = [_this,\"onKeyDown\",0,107,0,107] execVM \"\ca\ui\scripts\handleGear.sqf\";"
1 execFSM !"\"execFSM\"," !"execFSM \"\z\addons\dayz_code\system" !"execFSM '\z\AddOns\dayz_code\system" !"execfsm \"CA\animals2\Data\scripts\idleSpecialAnim.fsm\"" !"execFSM \"CA\animals2\Data\scripts\\reactFire.fsm\"" !"rexecfsm = 'execfsm'" !"rexecfsmcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'execfsm.sqf')"
-1 setVectorUp !"\"setVectorUp\"," !"_bolt setVectorUp _vUp;"
+1 setVectorUp !"\"setVectorUp\"," !"_zombieSpeak" !"_bolt setVectorUp _vUp;"
1 SetVectorDir !"\"SetVectorDir\"," !"_obj setVectorDirAndUp [_vdir, _vup];"
1 setVectorDirAndUp !"\"setVectorDirAndUp\"," !"_obj setVectorDirAndUp [_vdir, _vup];"
-1 setVelocity !"\"setVelocity\"," !"_FlipFlopPara" !"_character setVelocity [0,0,100];" !"_car setvelocity [1,0,0];" !"_object setvelocity [1,0,0];" !"_vehicle setvelocity [0,0,1];" !"if (_velz>1) then {_v setvelocity [_xv/1.3,_yv/1.3,0]}" !"(_v setvelocity [velocity _v select 0,velocity _v select 1,0]);"
+1 setVelocity !"\"setVelocity\"," !"_agent setDir round(random 360);" !"_FlipFlopPara" !"_character setVelocity [0,0,100];" !"_car setvelocity [1,0,0];" !"_object setvelocity [1,0,0];" !"_vehicle setvelocity [0,0,1];" !"if (_velz>1) then {_v setvelocity [_xv/1.3,_yv/1.3,0]}" !"(_v setvelocity [velocity _v select 0,velocity _v select 1,0]);"
1 setVelocityTransformation !"\"setVelocityTransformation\","
1 selectPlayer !"\"selectPlayer\"," !"selectPlayer _newUnit;" !"selectPlayer dayz_originalPlayer;"
-1 isServer !"\"isServer\"," !"if ((_persistent) && (!_error) && (isServer)) then" !"if (isServer) then {BIS_DEBUG_MPF_SERVERORCLIENT = \"(server)\";} else {BIS_DEBUG_MPF_SERVERORCLIENT = \"(c)\";};" !"{ BIS_functions_mainscope = _this select 0; if (isServer) then {_this execVM 'ca\modules\functions\main.sqf'};}" !"scriptName \"MP\data\scripts\JIPwaitFor.sqf\";\n\nif (!isServer) then\n{\n\nwaitUntil {!isNil {player}};" !"if ((!isServer) && (isNull player) ) then\n{\nwaitUntil {!isNull player};\nwaitUntil {time > 3};\n};" !"if ((!isServer) && (player != player)) then\n{\n waitUntil {player == player};\n waitUntil {time > 3};\n};" !"if(isServer) then {\ndayz_players = [];\ndead_bodyCleanup = [];\n};" !"BIS_DEBUG_MPF_SERVERORCLIENT,_caller, local _caller]; \n\nif (isServer) then\n{" !"if (!isServer) then {textLogFormat [\"MPF_Client FUNCTIONS init.sqf ...\"];};" !"if (!isServer) then {\n \"drn_DynamicWeatherEventArgs\" addPublicVariableEventHandler {" !"if (isServer) then {\n waitUntil{dayz_preloadFinished};\n};" !"if (isserver) then \n{\n_snd = createSoundSource [\"Sound_Fire\", getpos _v" !"if (isServer) then {\ndayzPlayerSave call server_playerSync;\n};\ndayz_last" !"if (!isServer) then {\n\"drn_DynamicWeatherEventArgs\" addPublicVariableEven" !"if (isServer) then {\ncall compile preprocessFileLineNumbers \"\z\addons" !"if (isServer) then {\nif (allowConnection) then {\ndayzUpdateVehicle call" !"if (isServer) then {\n\"dayzDeath\" addPublicVariableEventHandler {_id" !"publicVariableServer \"dayzCharDisco\";\nif (isServer) then {\n\ndayzCharDisco call server_characterSync;\n};" !"if (isServer) then {\n_unit setVariable[\"medForceUpdate\",true];\n};" !"if (isServer) then {\n\nhiveInUse = true;\n_serverMonitor =" !="isServer" !="!isServer" !="count playableUnits == 0 and isServer" !"publicVariableServer \"dayzLogin\";\nif (isServer) then {\ndayzLogin call server_playerLogin;\n};" !"publicVariable \"dayzLogin2\";\nif (isServer) then {\ndayzLogin2 spawn server_playerSetup;" !"if (count playableUnits == 0 and isServer) then {\n\nisSinglePlayer = true;" !"if (isServer) then {\n_eh2 = _unit addEventHandler [\"GetOut\","
-1 isDedicated !"\"isDedicated\"," !"dayz_loadScreen" !"needUpdate_objects = []" !"if (!isDedicated) then {\n\n0 fadeSound 0;\n0 cutText [(localize" !"if (!isDedicated) then {\n\"dayzSetDate\" addPublicVariableEventHandler {setDate (_this select 1)};" !"if (!isDedicated) then {\n_config = configFile >> \"CfgLoot\";" !"if(isDedicated) then {\ndayz_disco = [];\n};" !"if (!isDedicated) then {\nif (!isNull _agent) then {\ndeleteVehicle _agent;\n};\n} else {\n[_agent] call zombie_findOwner;" !"if (!isDedicated) then {\n0 fadeSound 0;\n0 cutText [(localize \"STR_AUTHENTIC"
+1 isServer !"\"isServer\"," !"endMission \"END6\";" !"if ((_persistent) && (!_error) && (isServer)) then" !"if (isServer) then {BIS_DEBUG_MPF_SERVERORCLIENT = \"(server)\";} else {BIS_DEBUG_MPF_SERVERORCLIENT = \"(c)\";};" !"{ BIS_functions_mainscope = _this select 0; if (isServer) then {_this execVM 'ca\modules\functions\main.sqf'};}" !"scriptName \"MP\data\scripts\JIPwaitFor.sqf\";\n\nif (!isServer) then\n{\n\nwaitUntil {!isNil {player}};" !"if ((!isServer) && (isNull player) ) then\n{\nwaitUntil {!isNull player};\nwaitUntil {time > 3};\n};" !"if ((!isServer) && (player != player)) then\n{\n waitUntil {player == player};\n waitUntil {time > 3};\n};" !"if(isServer) then {\ndayz_players = [];\ndead_bodyCleanup = [];\n};" !"BIS_DEBUG_MPF_SERVERORCLIENT,_caller, local _caller]; \n\nif (isServer) then\n{" !"if (!isServer) then {textLogFormat [\"MPF_Client FUNCTIONS init.sqf ...\"];};" !"if (!isServer) then {\n \"drn_DynamicWeatherEventArgs\" addPublicVariableEventHandler {" !"if (isServer) then {\n waitUntil{dayz_preloadFinished};\n};" !"if (isserver) then \n{\n_snd = createSoundSource [\"Sound_Fire\", getpos _v" !"if (isServer) then {\ndayzPlayerSave call server_playerSync;\n};\ndayz_last" !"if (!isServer) then {\n\"drn_DynamicWeatherEventArgs\" addPublicVariableEven" !"if (isServer) then {\ncall compile preprocessFileLineNumbers \"\z\addons" !"if (isServer) then {\nif (allowConnection) then {\ndayzUpdateVehicle call" !"if (isServer) then {\n\"dayzDeath\" addPublicVariableEventHandler {_id" !"publicVariableServer \"dayzCharDisco\";\nif (isServer) then {\n\ndayzCharDisco call server_characterSync;\n};" !"if (isServer) then {\n_unit setVariable[\"medForceUpdate\",true];\n};" !"if (isServer) then {\n\nhiveInUse = true;\n_serverMonitor =" !="isServer" !="!isServer" !="count playableUnits == 0 and isServer" !"publicVariableServer \"dayzLogin\";\nif (isServer) then {\ndayzLogin call server_playerLogin;\n};" !"publicVariable \"dayzLogin2\";\nif (isServer) then {\ndayzLogin2 spawn server_playerSetup;" !"if (count playableUnits == 0 and isServer) then {\n\nisSinglePlayer = true;" !"if (isServer) then {\n_eh2 = _unit addEventHandler [\"GetOut\","
+1 isDedicated !"\"isDedicated\"," !"endMission \"END6\";" !"dayz_loadScreen" !"needUpdate_objects = []" !"if (!isDedicated) then {\n\n0 fadeSound 0;\n0 cutText [(localize" !"if (!isDedicated) then {\n\"dayzSetDate\" addPublicVariableEventHandler {setDate (_this select 1)};" !"if (!isDedicated) then {\n_config = configFile >> \"CfgLoot\";" !"if(isDedicated) then {\ndayz_disco = [];\n};" !"if (!isDedicated) then {\nif (!isNull _agent) then {\ndeleteVehicle _agent;\n};\n} else {\n[_agent] call zombie_findOwner;" !"if (!isDedicated) then {\n0 fadeSound 0;\n0 cutText [(localize \"STR_AUTHENTIC"
1 removeAllWeapons !"\"removeAllWeapons\"," !"rremoveAllWeapons = 'removeAllWeapons'" !"rremoveAllWeaponscode = compile PreprocessFile (BIS_PathMPscriptCommands + 'removeAllWeapons.sqf')" !"{_newUnit removeMagazine _x;} forEach magazines _newUnit;\nremoveAllWeapons _newUnit;" !"removeallweapons _v;\n\nif (local _v) then {_expl=\"HelicopterExploSmall\" createvehicle (getpos _v);};"
1 addMenu !"\"addMenu\"," !"addMenuItem"
1 addMenuItem !"\"addMenuItem\","
@@ -174,7 +174,7 @@
1 "remExFP" !"\"remExFP\"," !"\"remExFP\" addPublicVariableEventHandler {_this call BIS_MPF_remoteExecutionServer};" !"if (isNil \"remExFP\") then {remExFP = [];};" !"if ((_this select 0 == \"persistent\") || (_this select 0 == \"remExFP\")) then {_persistent = true;} else {_persistent = false;};"
1 "remExWrite.sqf" !"scriptName \"MP\data\scripts\remExWrite.sqf\";" !"RE = compile preprocessFile (BIS_MP_Path + BIS_PATH_SQF + \"remExWrite.sqf\");"
1 "remExServer.sqf" !"scriptName \"MP\data\scripts\remExServer.sqf\";" !"BIS_MPF_remoteExecutionServer = compile preprocessFile (BIS_MP_Path + BIS_PATH_SQF + \"remExServer.sqf\");"
-1 "call RE" !"ActsPercMrunSlowWrflDf_FlipFlop" !"ActsPercMrunSlowWrflDf_FlipFlopPara" !"if (_local) then {\n_unit say [_sound, _dis];\n} else {\n[nil,_unit,rSAY,[_sound, _dis]] call RE;\n};\n};" !"_dir = [_unit,player] call BIS_Fnc_dirTo;\n_unit setDir _dir;\n[objNull, _unit, rPlayMove,_move] call RE;" !"if(_currentWpn != \"\") then {_newUnit selectWeapon _currentWpn;};\n[objNull, player, rSwitchMove,_currentAnim] call RE;" !"if (_currentAnim != \"\") then {\n[objNull, player, rSwitchMove,_currentAnim] call RE;\n};" !"[nil, _targetClient,\"loc\", rJIPEXEC, BIS_MPF_ServerPersistentCallsArray select _i] call RE;" !"BIS_MPF_clientJIPlogic = player;\n\nnic = [BIS_MPF_clientJIPlogic,nil,rJIPREQUEST] call RE;" !"[objNull, player, rSwitchMove,\"\"] call RE;\nplayer playActionNow \"stop\";" !"[nil,_trap,rSAY,[\"trap_bear_0\",60]] call RE;" !"waituntil {!isnil \"BIS_MPF_InitDone\"};\n_spawn = [nil, nil, \"per\", rEXECVM,\"ca\Modules\Functions\init.sqf\"] call RE;"
+1 "call RE" !"[objNull,_unit,rPlayMove,_move]" !"ActsPercMrunSlowWrflDf_FlipFlop" !"ActsPercMrunSlowWrflDf_FlipFlopPara" !"if (_local) then {\n_unit say [_sound, _dis];\n} else {\n[nil,_unit,rSAY,[_sound, _dis]] call RE;\n};\n};" !"_dir = [_unit,player] call BIS_Fnc_dirTo;\n_unit setDir _dir;\n[objNull, _unit, rPlayMove,_move] call RE;" !"if(_currentWpn != \"\") then {_newUnit selectWeapon _currentWpn;};\n[objNull, player, rSwitchMove,_currentAnim] call RE;" !"if (_currentAnim != \"\") then {\n[objNull, player, rSwitchMove,_currentAnim] call RE;\n};" !"[nil, _targetClient,\"loc\", rJIPEXEC, BIS_MPF_ServerPersistentCallsArray select _i] call RE;" !"BIS_MPF_clientJIPlogic = player;\n\nnic = [BIS_MPF_clientJIPlogic,nil,rJIPREQUEST] call RE;" !"[objNull, player, rSwitchMove,\"\"] call RE;\nplayer playActionNow \"stop\";" !"[nil,_trap,rSAY,[\"trap_bear_0\",60]] call RE;" !"waituntil {!isnil \"BIS_MPF_InitDone\"};\n_spawn = [nil, nil, \"per\", rEXECVM,\"ca\Modules\Functions\init.sqf\"] call RE;"
1 "spawn RE"
1 "toArray" !"\"toArray\"," !"BIS_fnc_invCodeToArray" !"ca\modules\functions\inventory\fn_invCodeToArray.sqf" !"_anim = animationState player;\n_anim4 = toArray _anim;\n_anim4 resize 4;" !"_type = surfaceType _pos;\n_typeA = toArray _type;" !"if([\"Wheel\",_x,false] call fnc_inString) then {\n_part = \"PartWheel\";\n_cmpt = \"Wheel\";\n_array = toArray _x;" !"{_casesensitive = _this select 2;};\n\n_findarray = toArray _find;\n_stringarray = toArray _string;" !"_text = _this;\n_textArrayUnicode = [];\n{_textArrayUnicode = _textArrayUnicode + [toarray _x]} foreach _text;" !"_cmpt = toArray (_x);\n_cmpt set [0,20];\n_cmpt set [1,toArray ("-") select 0]"
1 "createTrigger" !"\"createTrigger\"," !"_t=createTrigger[\"EmptyDetector\",(_player modelToWorld[0,0,0])];"
@@ -189,14 +189,14 @@
1 "BIS_fnc_spawnVehicle" !"if (isnil 'BIS_fnc_spawnVehicle"
1 "BIS_fnc_halo" !"if (isnil 'BIS_fnc_halo"
1 "BIS_fnc_sceneSetPosFormation" !"if (isnil 'BIS_fnc_scenesetposformation"
-1 "BIS_fnc_invAdd" !"if (isnil 'BIS_fnc_invAdd" !"_isOk = [player,_config] call BIS_fnc_invAdd;" !"_isOk = [player,_config2] call BIS_fnc_invAdd;" !"_result = [player,\"PartWoodPile\"] call BIS_fnc_invAdd;" !"INV_ Error: BIS_FNC_invAdd"
+1 "BIS_fnc_invAdd" !"_result = [player,_part] call BIS_fnc_invAdd" !"if (isnil 'BIS_fnc_invAdd" !"_isOk = [player,_config] call BIS_fnc_invAdd;" !"_isOk = [player,_config2] call BIS_fnc_invAdd;" !"_result = [player,\"PartWoodPile\"] call BIS_fnc_invAdd;" !"INV_ Error: BIS_FNC_invAdd"
1 "BIS_fnc_infoText" !"if (isnil 'BIS_fnc_infoText" !"_first = [_x select 0,_x select 1] spawn BIS_fnc_infoText;" !"_first = [_world,_town,localize (\"str_player_06\") + \" \" + str(_days)] spawn BIS_fnc_infoText;"
1 "AttachObject" !"\"AttachObject\"," !"lightAttachObject" !"triggerAttachObject" !"waypointAttachObject"
1 "lightAttachObject" !"\"lightAttachObject\"," !"_lightArea lightAttachObject [_flare, [0,0,0]];" !"_lightSpark lightAttachObject [_flare, [0,0,0]];" !"_li lightAttachObject [_flare, [0,0,0]];" !"_li lightAttachObject [_v, [0,0,0]];"
1 "triggerAttachObject" !"\"triggerAttachObject\","
1 "waypointAttachObject" !"\"waypointAttachObject\","
5 "remoteControl" !"\"remoteControl\","
-1 "switchCamera" !"\"switchCamera\"," !"rswitchCamera = 'switchCamera'" !"rswitchCameracode = compile PreprocessFile (BIS_PathMPscriptCommands + 'switchCamera.sqf')"
+1 "switchCamera" !"\"switchCamera\"," !"FPOnly" !"rswitchCamera = 'switchCamera'" !"rswitchCameracode = compile PreprocessFile (BIS_PathMPscriptCommands + 'switchCamera.sqf')"
1 "rsetTask" !"rsetTaskState = 'setTaskState'" !"rsetTaskStatecode = compile PreprocessFile (BIS_PathMPscriptCommands + 'setTaskState.sqf')"
1 "rsay" !"rsay = 'say'" !"rsaycode" !"if (_local) then {\n_unit say [_sound, _dis];\n} else {\n[nil,_unit,rSAY,[_sound, _dis]] call RE;\n};\n};" !"[nil,_trap,rSAY,[\"trap_bear_0\",60]] call RE;"
1 "rsaycode" !"rsaycode = compile PreprocessFile (BIS_PathMPscriptCommands + 'say.sqf')" !"rsaycode"
@@ -397,4 +397,4 @@
5 "deletevehicle _box;"
5 "GAU8" !="player removeWeapon \"GAU8\";"
5 "GAU12" !="player removeWeapon \"GAU12\";"
-5 "YakB" !="player removeWeapon \"YakB\";"
+5 "YakB" !="player removeWeapon \"YakB\";"
\ No newline at end of file