diff --git a/CHANGE LOG 1.0.5.2.txt b/CHANGE LOG 1.0.5.2.txt
index 6bc7e0d03..ca13496a2 100644
--- a/CHANGE LOG 1.0.5.2.txt
+++ b/CHANGE LOG 1.0.5.2.txt
@@ -1,9 +1,13 @@
+[NEW] RedRyder BB Gun by @arma2WillRobinson
+[NEW] DB Backup script. @RimBlock
[NEW] Use DayZ_UseSteamID = false; in your init.sqf to use the old PlayerUID, instead of SteamID @icomrade
[NEW] UI Update - Graphical and code changes, enable using Dayz_Dark_UI = true; in init.sqf. @hogscraper http://epochmod.com/forum/index.php?/topic/13654-proposed-ui-change/
[NOTE] It's recommend to convert to the new SteamID system if possible, new servers should not use DayZ_UseSteamID = false;
+[NEW] Snap building (disabled by default), use DZE_snapBuilding = true; in your init.sqf to enable. @raymix
[CHANGED] An infection chance of -1 disables self-transfusion infection. 0 is always infected. (DZE_selfTransfuse_Values) @icomrade
[CHANGED] Removed weapons from Traders hands and made them stand with arms by their side. @SilvDev
+[CHANGED] Tweaked fuel capacity variables for vehicles. @RimBlock
[FIXED] Backpack wipes when changing clothes. #1361 @icomrade
[FIXED] CH53 gear when locked #1364 @icomrade
@@ -11,6 +15,10 @@
[FIXED] Only first kill showing on death boards #1362 #1124 @vbawol @icomrade
[FIXED] Crossbow quivers not working #1355 @icomrade
[FIXED] Crash_spawner & Supply_drop modules spawning inaccessible loot piles #1408 #1390 @Uro1
+[FIXED] Undefined variable "_weapon" in fnc_plyrHit.sqf when killer is driving a vehicle #1420 @ebaydayz
+[FIXED] Fire cleanup diag_log error in server_functions.sqf #1421 @ebaydayz
+[FIXED] NearestObjects position error in server_playerSync.sqf #1425 @ebaydayz
+[FIXED] Corrected ClassName type for CH53_DZE and BAF_Merlin_DZE. @Cinjun
[UPDATED] .hpp files updated in dayz_epoch_b CfgLootPos > CfgBuildingPos. @Uro1
[UPDATED] .bat files updated in Config-Examples @Raziel23x
diff --git a/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp b/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp
new file mode 100644
index 000000000..0cc12c0ca
--- /dev/null
+++ b/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp
@@ -0,0 +1,406 @@
+/*
+Created by Raymix
+*/
+
+
+class SnapBuilding {
+ //Barriers whitelist
+ class Barrier {
+ snapTo[] = {
+ "Land_HBarrier5_DZ",
+ "Land_HBarrier3_DZ",
+ "Land_HBarrier1_DZ",
+ "Sandbag1_DZ",
+ "BagFenceRound_DZ",
+ "Fort_RazorWire"
+ };
+ radius = 5;
+ };
+ //snap points
+ class Land_HBarrier5Preview: Barrier{ //fix for broken offsets in ghost
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-0.75,0.1,"Back"},
+ {0,0.75,0.1,"Front"},
+ {-2.85,0,0.1,"Left"},
+ {2.85,0,0.1,"Right"},
+ {0,0,0.9,"Top"}
+ };
+ };
+ class Land_HBarrier5_DZ: Land_HBarrier5Preview {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-0.75,0,"Back"},
+ {0,0.75,0,"Front"},
+ {-2.85,0,0,"Left"},
+ {2.85,0,0,"Right"},
+ {0,0,0.9,"Top"}
+ };
+ };
+
+ class Land_HBarrier3ePreview: Barrier { //whitelist inheritance
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-0.75,0,"Back"},
+ {0,0.75,0,"Front"},
+ {-1.7,0,0,"Left"},
+ {1.7,0,0,"Right"},
+ {0,0,0.9,"Top"}
+ };
+ };
+ class Land_HBarrier3_DZ: Land_HBarrier3ePreview{}; //point inheritance
+
+ class Land_HBarrier1Preview: Barrier {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-0.75,0,"Back"},
+ {0,0.75,0,"Front"},
+ {-0.6,0,0,"Left"},
+ {0.6,0,0,"Right"},
+ {0,0,0.9,"Top"}
+ };
+ };
+ class Land_HBarrier1_DZ: Land_HBarrier1Preview{};
+
+ class Fort_RazorWirePreview: Barrier {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-0.95,-0.3,"Back"},
+ {0,0.95,-0.3,"Front"},
+ {-4.1,0,-0.3,"Left"},
+ {4.1,0,-0.3,"Right"},
+ {0,0,1,"Top"}
+ };
+ };
+ class Fort_RazorWire: Fort_RazorWirePreview {};
+
+ class Sandbag1_DZ: Barrier {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-1.5,0,0,"Left"},
+ {1.5,0,0,"Right"},
+ {0,0,0.4,"Top"}
+ };
+ };
+
+ class BagFenceRound_DZ: Barrier {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-1.295,0.38,0,"Left"},
+ {1.295,0.38,0,"Right"},
+ {0,0,0.4,"Top"}
+ };
+ };
+
+ //Snapping whitelists for Floors, walls and stairs
+ class FloorsWallsStairs {
+ snapTo[] = {
+ "WoodFloorQuarter_DZ",
+ "WoodFloorHalf_DZ",
+ "WoodFloor_DZ",
+ "WoodStairs_DZ",
+ "WoodStairsSans_DZ",
+ "WoodSmallWallDoor_DZ",
+ "WoodSmallWall_DZ",
+ "WoodSmallWallWin_DZ",
+ "Land_DZE_WoodDoor",
+ "Land_DZE_WoodDoorLocked",
+ "WoodLargeWall_DZ",
+ "Land_DZE_LargeWoodDoor",
+ "WoodLargeWallWin_DZ",
+ "WoodLargeWallDoor_DZ",
+ "Land_DZE_GarageWoodDoor",
+ "Land_DZE_GarageWoodDoorLocked",
+ "Land_DZE_LargeWoodDoorLocked",
+ "WoodSmallWallThird_DZ",
+ "CinderWall_DZ",
+ "CinderWallDoorway_DZ",
+ "CinderWallDoorLocked_DZ",
+ "CinderWallDoor_DZ",
+ "CinderWallSmallDoorway_DZ",
+ "CinderWallDoorSmallLocked_DZ",
+ "CinderWallHalf_DZ",
+ "CinderWallDoorSmall_DZ",
+ "MetalFloor_DZ"
+ };
+ radius = 5;
+ };
+
+ class WoodFloorQuarter_Preview_DZ: FloorsWallsStairs { //fix for broken offsets in ghost
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-1.23,0,"Back"},
+ {0,1.23,0,"Front"},
+ {-1.24,0,0,"Left"},
+ {1.24,0,0,"Right"}
+ };
+ };
+
+ class WoodFloorQuarter_DZ: FloorsWallsStairs {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-1.23,0.137726,"Back"},
+ {0,1.23,0.137726,"Front"},
+ {-1.24,0,0.137726,"Left"},
+ {1.24,0,0.137726,"Right"}
+ };
+ };
+
+ class WoodFloorHalf_Preview_DZ: FloorsWallsStairs { //fix for broken offsets in ghost
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-2.34,0,"Back"},
+ {0,2.34,0,"Front"},
+ {-1.25,0,0,"Left"},
+ {1.25,0,0,"Right"}
+ };
+ };
+ class WoodFloorHalf_DZ: FloorsWallsStairs{
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-2.34,0.1407,"Back"},
+ {0,2.34,0.1407,"Front"},
+ {-1.25,0,0.1407,"Left"},
+ {1.25,0,0.1407,"Right"}
+ };
+ };
+
+ class WoodFloor_Preview_DZ: FloorsWallsStairs {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-2.33,0.130,"Back"},
+ {0,2.33,0.130,"Front"},
+ {-2.45,0,0.130,"Left"},
+ {2.45,0,0.130,"Right"}
+ };
+ radius = 10;
+ };
+ class WoodFloor_DZ: WoodFloor_Preview_DZ{};
+
+ class Stairs_DZE: FloorsWallsStairs {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {1.56055,-0.78,1.5,"Back"},
+ {1.56055,0.78,1.5,"Front"},
+ {1.73926,0.05,2.9,"Top"},
+ {-1.73926,0.05,0,"Bottom"}
+ };
+ };
+ class WoodStairs_DZ: Stairs_DZE {};
+ class WoodStairs_Preview_DZ: Stairs_DZE {};
+ class WoodStairsSans_Preview_DZ: Stairs_DZE {};
+ class WoodStairsSans_DZ: Stairs_DZE {};
+
+ class WoodSmall_DZE: FloorsWallsStairs { // Small wood walls
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.285, 0, 1.5,"Left"},
+ {2.285, 0, 1.5,"Right"},
+ {0, 0, 3,"Top"}
+ };
+ };
+ class WoodSmallWallDoor_Preview_DZ: WoodSmall_DZE {};
+ class WoodSmallWall_Preview_DZ: WoodSmall_DZE {};
+ class WoodSmallWallWin_Preview_DZ: WoodSmall_DZE {};
+ class WoodSmallWallDoor_DZ: WoodSmall_DZE {};
+ class WoodSmallWall_DZ: WoodSmall_DZE {};
+ class WoodSmallWallWin_DZ: WoodSmall_DZE {};
+ class Land_DZE_WoodDoor: WoodSmall_DZE {};
+ class Land_DZE_WoodDoorLocked: WoodSmall_DZE {};
+ class WoodDoor_Preview_DZ: WoodSmall_DZE{};
+
+ class WoodLarge_DZE: FloorsWallsStairs { //Large wood walls
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.45, 0, 1.5,"Left"},
+ {2.45, 0, 1.5,"Right"},
+ {0, 0, 3,"Top"}
+ };
+ };
+ class WoodLargeWall_Preview_DZ: WoodLarge_DZE {};
+ class WoodLargeWallWin_Preview_DZ: WoodLarge_DZE {};
+ class WoodLargeWallDoor_Preview_DZ: WoodLarge_DZE {};
+ class WoodSmallWallThird_Preview_DZ: WoodLarge_DZE {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.445, 0, 1.5,"Left"},
+ {2.445, 0, 1.5,"Right"},
+ {0, 0, 1.17,"Top"}
+ };
+ };
+ class WoodSmallWallThird_DZ: WoodSmallWallThird_Preview_DZ{};
+ class WoodLargeWall_DZ: WoodLarge_DZE {};
+ class Land_DZE_LargeWoodDoor: WoodLarge_DZE {};
+ class WoodLargeWallWin_DZ: WoodLarge_DZE {};
+ class WoodLargeWallDoor_DZ: WoodLarge_DZE {};
+ class Land_DZE_GarageWoodDoor: WoodLarge_DZE {};
+ class GarageWoodDoor_Preview_DZ: WoodLarge_DZE {};
+ class Land_DZE_GarageWoodDoorLocked: WoodLarge_DZE {};
+ class Land_DZE_LargeWoodDoorLocked: WoodLarge_DZE {};
+ class LargeWoodDoor_Preview_DZ: WoodLarge_DZE {};
+
+ class Cinder_DZE: FloorsWallsStairs { //All cinder walls and doors
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.752, 0, 1.5,"Left"},
+ {2.752, 0, 1.5,"Right"},
+ {0, 0, 3.37042,"Top"}
+ };
+ radius = 5;
+ };
+ class CinderWall_Preview_DZ: Cinder_DZE {};
+ class CinderWallDoorway_Preview_DZ: Cinder_DZE {};
+ class CinderWallSmallDoorway_Preview_DZ: Cinder_DZE {};
+ class CinderWallHalf_Preview_DZ: Cinder_DZE {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.752, 0, 1.5,"Left"},
+ {2.752, 0, 1.5,"Right"},
+ {0, 0, 1.5,"Top"}
+ };
+ };
+ class CinderWall_DZ: Cinder_DZE {};
+ class CinderWallDoorway_DZ: Cinder_DZE {};
+ class CinderWallDoorLocked_DZ: Cinder_DZE {};
+ class CinderWallDoor_DZ: Cinder_DZE {};
+ class CinderWallSmallDoorway_DZ: Cinder_DZE {};
+ class CinderWallDoorSmallLocked_DZ: Cinder_DZE {};
+ class CinderWallHalf_DZ: Cinder_DZE {
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.752, 0, 1.5,"Left"},
+ {2.752, 0, 1.5,"Right"},
+ {0, 0, 1.5,"Top"}
+ };
+ };
+ class CinderWallDoorSmall_DZ: Cinder_DZE {};
+
+ class MetalFloor_Preview_DZ: FloorsWallsStairs { //fix for broken offsets in ghost
+ points[] = {
+ {0,0,0.011,"Pivot"},
+ {0, -2.64, 0.009,"Back"},
+ {0, 2.64, 0.009,"Front"},
+ {-2.64, 0, 0.009,"Left"},
+ {2.64, 0, 0.009,"Right"}
+ };
+ radius = 10;
+ };
+ class MetalFloor_DZ: FloorsWallsStairs{
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0, -2.64, 0.15,"Back"},
+ {0, 2.64, 0.15,"Front"},
+ {-2.64, 0, 0.15,"Left"},
+ {2.64, 0, 0.15,"Right"}
+ };
+ radius = 10;
+ };
+
+
+ //Non essential Items that only snap to themselves, do whitelist inheritance if you want these to snap
+ class WoodCrate_DZ {
+ snapTo[] = {
+ "WoodCrate_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,-0.47,0,"Back"},
+ {0,0.47,0,"Front"},
+ {-0.47,0,0,"Left"},
+ {0.47,0,0,"Right"},
+ {0,0,0.47,"Top"}
+ };
+ };
+
+ class MetalPanel_DZ {
+ snapTo[] = {
+ "MetalPanel_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-1.5,0,0,"Left"},
+ {1.5,0,0,"Right"}
+ };
+ };
+
+ class MetalGate_DZ {
+ snapTo[] = {
+ "MetalGate_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-4.1,0,0,"Left"}
+ };
+ };
+
+ class StickFence_DZ {
+ snapTo[] = {
+ "StickFence_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-2.95,0,0.3,"Left"},
+ {2.95,0,0.3,"Right"}
+ };
+ };
+
+ class Fence_corrugated_DZ {
+ snapTo[] = {
+ "Fence_corrugated_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-1.95,0,0.88,"Left"},
+ {1.95,0,0.88,"Right"}
+ };
+ };
+
+ class WoodRamp_Preview_DZ {
+ snapTo[] = {
+ "WoodRamp_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0.65,-1.7,1.2,"Back"},
+ {0.65,1.5,1.2,"Front"},
+ {3.34,-0.115,2.82,"Top"}
+ };
+ };
+ class WoodRamp_DZ: WoodRamp_Preview_DZ{};
+
+ class WoodLadder_Preview_DZ {
+ snapTo[] = {
+ "WoodLadder_DZ"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {-0.4,0,1.725,"Left"},
+ {0.4,0,1.725,"Right"}
+ };
+ };
+ class WoodLadder_DZ: WoodLadder_Preview_DZ{};
+
+ class VaultStorageLocked {
+ snapTo[] = {
+ "VaultStorageLocked",
+ "VaultStorage"
+ };
+ radius = 5;
+ points[] = {
+ {0,0,0,"Pivot"},
+ {0,0.284,0.615,"Back"},
+ {0,0,1.23,"Top"},
+ {-0.362,0,0.615,"Left"},
+ {0.362,0,0.615,"Right"}
+ };
+
+ };
+ class VaultStorage: VaultStorageLocked {};
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/AH6.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/AH6.hpp
index 9aa5bb48f..82b334199 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/AH6.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/AH6.hpp
@@ -70,6 +70,7 @@ class AH6X_DZ: AH6_Base_EP1 {
transportMaxWeapons = 3;
transportMaxMagazines = 10;
transportmaxbackpacks = 2;
+ fuelCapacity = 242;
class Turrets {};
};
class MH6J_DZ: AH6_Base_EP1 {
@@ -98,4 +99,4 @@ class MH6J_DZ: AH6_Base_EP1 {
transportMaxMagazines = 20;
transportmaxbackpacks = 5;
class Turrets {};
-};
\ No newline at end of file
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/AN2.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/AN2.hpp
index 062dea1c3..6d5a3268c 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/AN2.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/AN2.hpp
@@ -20,4 +20,5 @@ class AN2_DZ: An2_Base_EP1
transportMaxWeapons = 10;
transportMaxMagazines = 80;
transportmaxbackpacks = 15;
-};
\ No newline at end of file
+ fuelCapacity = 757;
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/BAF_Merlin.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/BAF_Merlin.hpp
index 8c01b5a9b..feefb48c5 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/BAF_Merlin.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/BAF_Merlin.hpp
@@ -9,4 +9,5 @@ class BAF_Merlin_DZE : BAF_Merlin_HC3_D {
transportMaxWeapons = 15;
transportMaxMagazines = 150;
transportmaxbackpacks = 5;
-};
\ No newline at end of file
+ fuelCapacity = 3222;
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/C130.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/C130.hpp
index 178c79795..4348ed7ef 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/C130.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/C130.hpp
@@ -3,4 +3,5 @@ class C130J_US_EP1_DZ: C130J_US_EP1 {
transportMaxWeapons = 50;
transportMaxMagazines = 400;
transportmaxbackpacks = 20;
-};
\ No newline at end of file
+ fuelCapacity = 34095;
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/CH47.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/CH47.hpp
index fc339307d..f5e5224cc 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/CH47.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/CH47.hpp
@@ -117,6 +117,7 @@ class CH47_base_EP1: Helicopter
irScanRangeMin = 100;
irScanRangeMax = 1000;
irScanToEyeFactor = 2;
+ fuelCapacity = 4043;
};
class CH_47F_EP1;
@@ -278,4 +279,4 @@ class CH_47F_EP1_DZE: CH47_base_EP1
weapon = "M134_2";
};
};
-};
\ No newline at end of file
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/CH53.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/CH53.hpp
index e850e134e..b18f56d67 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/CH53.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/CH53.hpp
@@ -27,4 +27,5 @@ class CH53_DZE : USEC_ch53_E {
transportMaxWeapons = 25;
transportMaxMagazines = 80;
transportmaxbackpacks = 15;
+ fuelCapacity = 3849;
};
\ No newline at end of file
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/MV22.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/MV22.hpp
index c83f5d468..664fa5516 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/MV22.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/MV22.hpp
@@ -11,4 +11,5 @@ class MV22_DZ : MV22 {
transportMaxWeapons = 20;
transportMaxMagazines = 400;
transportmaxbackpacks = 10;
-};
\ No newline at end of file
+ fuelCapacity = 6513;
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/Mi17.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/Mi17.hpp
index 6dac4f67d..9183962b6 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/Mi17.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/Mi17.hpp
@@ -26,6 +26,7 @@ class Mi17_DZ: Mi17_base {
transportMaxWeapons = 10;
transportMaxMagazines = 50;
transportmaxbackpacks = 10;
+ fuelCapacity = 1870;
class Turrets : Turrets {
class MainTurret : MainTurret {
@@ -64,4 +65,4 @@ class Mi17_Civilian_DZ: Mi17_Civilian {
transportMaxWeapons = 10;
transportMaxMagazines = 50;
transportmaxbackpacks = 10;
-};
\ No newline at end of file
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/UH1.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/UH1.hpp
index f1ac0ca14..d42a071af 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/UH1.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/UH1.hpp
@@ -28,6 +28,7 @@ class UH1Y_DZ: UH1_Base {
transportmaxbackpacks = 4;
weapons[] = {};
magazines[] = {};
+ fuelCapacity = 1333;
class Turrets : Turrets {
class MainTurret : MainTurret {
magazines[] = {"2000Rnd_762x51_M134"};
@@ -73,6 +74,7 @@ class UH1H_DZ: UH1H_base {
transportMaxWeapons = 5;
transportMaxMagazines = 25;
transportmaxbackpacks = 4;
+ fuelCapacity = 1333;
class Turrets : Turrets {
class MainTurret : MainTurret {
magazines[] = {"100Rnd_762x51_M240"};
@@ -91,4 +93,4 @@ class UH1H_DZE: UH1H_DZ {
magazines[] = {};
};
};
-};
\ No newline at end of file
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/AIR/UH60.hpp b/SQF/dayz_code/Configs/CfgVehicles/AIR/UH60.hpp
index e1b3f8693..419bad99b 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/AIR/UH60.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/AIR/UH60.hpp
@@ -11,6 +11,7 @@ class UH60_Base: Helicopter {
magazines[] = {"60Rnd_CMFlareMagazine"};
lockDetectionSystem = "8 + 4";
incommingMisslieDetectionSystem = 0;
+ fuelCapacity = 2760;
};
class MH60S_DZ : UH60_Base {
crew = "";
@@ -247,14 +248,13 @@ class UH60M_base_EP1: UH60_Base {
icon = "\ca\air_e\data\UI\Icon_uh60m_CA.paa";
mapSize = 17;
class Library {
- libTextDesc = "The Blackhawk is the US Army’s front-line utility helicopter used for transport roles, medical evacuation and even air support.
It is capable of carrying 11 combat-equipped soldiers. Easy to maintain in the field, the Blackhawk performs well in a variety of roles including air assault and medical evacuation.";
+ libTextDesc = "The Blackhawk is the US Army�s front-line utility helicopter used for transport roles, medical evacuation and even air support.
It is capable of carrying 11 combat-equipped soldiers. Easy to maintain in the field, the Blackhawk performs well in a variety of roles including air assault and medical evacuation.";
};
crew = "US_Soldier_Pilot_EP1";
typicalCargo[] = {"US_Soldier_Pilot_EP1","US_Soldier_Pilot_EP1"};
gunnerAction = "ManActTestDriver";
transportMaxBackpacks = 10;
transportSoldier = 13;
- fuelCapacity = 600;
maxSpeed = 295;
mainRotorSpeed = 1.2;
backRotorSpeed = 6.1;
@@ -549,4 +549,4 @@ class UH60M_EP1_DZE: UH60M_US_base_EP1 {
weapon = "M134_2";
};
};
-};
\ No newline at end of file
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/LAND/Kamaz.hpp b/SQF/dayz_code/Configs/CfgVehicles/LAND/Kamaz.hpp
index 1d6d219d7..57e535e33 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/LAND/Kamaz.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/LAND/Kamaz.hpp
@@ -24,5 +24,5 @@ class KamazRefuel_DZ: KamazRefuel {
class TransportMagazines{};
class TransportWeapons{};
transportFuel = 0;
- fuelCapacity = 10000;
-};
\ No newline at end of file
+ fuelCapacity = 10400;
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/SEA/PBX.hpp b/SQF/dayz_code/Configs/CfgVehicles/SEA/PBX.hpp
index effd26a1d..398640b59 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/SEA/PBX.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/SEA/PBX.hpp
@@ -26,4 +26,5 @@ class PBX: RubberBoat {
transportMaxMagazines = 50;
transportMaxWeapons = 5;
transportMaxBackpacks = 1;
-};
\ No newline at end of file
+ fuelCapacity = 23;
+};
diff --git a/SQF/dayz_code/Configs/CfgVehicles/SEA/RHIB.hpp b/SQF/dayz_code/Configs/CfgVehicles/SEA/RHIB.hpp
index 3d4870929..8524f99a1 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/SEA/RHIB.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/SEA/RHIB.hpp
@@ -17,7 +17,7 @@ class Ship : AllVehicles
maxSpeed = 30;
simulation = "ship";
audible = 6;
- fuelCapacity = 100;
+ fuelCapacity = 250;
formationX = 50;
formationZ = 100;
brakeDistance = 50;
@@ -569,4 +569,4 @@ class RHIB_DZ : Boat
"ca\water\data\rhib_dash_destruct.rvmat"
};
};
-};
\ No newline at end of file
+};
diff --git a/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf b/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf
index 0df2ca363..53de8087d 100644
--- a/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf
+++ b/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf
@@ -189,4 +189,9 @@ if (_dikCode == 0x39 || (_dikCode in actionKeys "User19")) then {
DZE_5 = true;
};
+// F key
+if ((_dikCode == 0x21 && (!_alt && !_ctrl)) || (_dikCode in actionKeys "User6")) then {
+ DZE_F = true;
+};
+
_handled
diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf
index c393f005f..ff7534816 100644
--- a/SQF/dayz_code/actions/player_build.sqf
+++ b/SQF/dayz_code/actions/player_build.sqf
@@ -337,7 +337,7 @@ if (_hasrequireditem) then {
if(abs(_objHDiff) > 5) exitWith {
_isOk = false;
_cancel = true;
- _reason = "Cannot move up || down more than 5 meters";
+ _reason = "Cannot move up or down more than 5 meters";
detach _object;
deleteVehicle _object;
};
@@ -521,7 +521,7 @@ if (_hasrequireditem) then {
publicVariableServer "PVDZE_obj_Publish";
cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5];
-
+ systemChat format [(localize "str_epoch_player_140"),_combinationDisplay,_text];
} else {
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
diff --git a/SQF/dayz_code/actions/player_build2.sqf b/SQF/dayz_code/actions/player_build2.sqf
new file mode 100644
index 000000000..339bfff29
--- /dev/null
+++ b/SQF/dayz_code/actions/player_build2.sqf
@@ -0,0 +1,627 @@
+/*
+ DayZ Base Building
+ Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
+*/
+private ["_helperColor","_objectHelper","_objectHelperDir","_objectHelperPos","_canDo",
+"_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_needNear","_vehicle","_inVehicle","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap"];
+
+if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
+DZE_ActionInProgress = true;
+
+// disallow building if too many objects are found within 30m
+if((count ((getPosATL player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};
+
+_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
+_isWater = dayz_isSwimming;
+_cancel = false;
+_reason = "";
+_canBuildOnPlot = false;
+
+_vehicle = vehicle player;
+_inVehicle = (_vehicle != player);
+//snap
+helperDetach = false;
+_canDo = (!r_drag_sqf and !r_player_unconscious);
+
+DZE_Q = false;
+DZE_Z = false;
+
+DZE_Q_alt = false;
+DZE_Z_alt = false;
+
+DZE_Q_ctrl = false;
+DZE_Z_ctrl = false;
+
+DZE_5 = false;
+DZE_4 = false;
+DZE_6 = false;
+DZE_F = false;
+
+DZE_cancelBuilding = false;
+
+call gear_ui_init;
+closeDialog 1;
+
+if (_isWater) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
+if (_inVehicle) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
+if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
+if (player getVariable["combattimeout", 0] >= time) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};
+
+_item = _this;
+
+// Need Near Requirements
+_abort = false;
+_reason = "";
+
+_needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "neednearby");
+
+{
+ switch(_x) do{
+ case "fire":
+ {
+ _distance = 3;
+ _isNear = {inflamed _x} count (getPosATL player nearObjects _distance);
+ if(_isNear == 0) then {
+ _abort = true;
+ _reason = "fire";
+ };
+ };
+ case "workshop":
+ {
+ _distance = 3;
+ _isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]);
+ if(_isNear == 0) then {
+ _abort = true;
+ _reason = "workshop";
+ };
+ };
+ case "fueltank":
+ {
+ _distance = 30;
+ _isNear = count (nearestObjects [player, dayz_fuelsources, _distance]);
+ if(_isNear == 0) then {
+ _abort = true;
+ _reason = "fuel tank";
+ };
+ };
+ };
+} forEach _needNear;
+
+
+if(_abort) exitWith {
+ cutText [format[(localize "str_epoch_player_135"),_reason,_distance], "PLAIN DOWN"];
+ DZE_ActionInProgress = false;
+};
+
+_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
+_classnametmp = _classname;
+_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
+_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
+_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
+
+_lockable = 0;
+if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then {
+ _lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable");
+};
+
+_requireplot = DZE_requireplot;
+if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
+ _requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
+};
+
+_isAllowedUnderGround = 1;
+if(isNumber (configFile >> "CfgVehicles" >> _classname >> "nounderground")) then {
+ _isAllowedUnderGround = getNumber(configFile >> "CfgVehicles" >> _classname >> "nounderground");
+};
+
+_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
+if((count _offset) <= 0) then {
+ _offset = [0,1.5,0];
+};
+
+_isPole = (_classname == "Plastic_Pole_EP1_DZ");
+_isLandFireDZ = (_classname == "Land_Fire_DZ");
+
+_distance = DZE_PlotPole select 0;
+_needText = localize "str_epoch_player_246";
+
+if(_isPole) then {
+ _distance = DZE_PlotPole select 1;
+};
+
+// check for near plot
+_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
+_findNearestPole = [];
+
+{
+ if (alive _x) then {
+ _findNearestPole set [(count _findNearestPole),_x];
+ };
+} count _findNearestPoles;
+
+_IsNearPlot = count (_findNearestPole);
+
+// If item is plot pole && another one exists within 45m
+if(_isPole && _IsNearPlot > 0) exitWith { DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_44") , "PLAIN DOWN"]; };
+
+if(_IsNearPlot == 0) then {
+
+ // Allow building of plot
+ if(_requireplot == 0 || _isLandFireDZ) then {
+ _canBuildOnPlot = true;
+ };
+
+} else {
+ // Since there are plots nearby we check for ownership && then for friend status
+
+ // check nearby plots ownership && then for friend status
+ _nearestPole = _findNearestPole select 0;
+
+ // Find owner
+ _ownerID = _nearestPole getVariable ["CharacterID","0"];
+
+ // diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
+
+ // check if friendly to owner
+ if(dayz_characterID == _ownerID) then { //Keep ownership
+ // owner can build anything within his plot except other plots
+ if(!_isPole) then {
+ _canBuildOnPlot = true;
+ };
+
+ } else {
+ // disallow building plot
+ if(!_isPole) then {
+ _friendlies = player getVariable ["friendlyTo",[]];
+ // check if friendly to owner
+ if(_ownerID in _friendlies) then {
+ _canBuildOnPlot = true;
+ };
+ };
+ };
+};
+
+// _message
+if(!_canBuildOnPlot) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };
+
+_missing = "";
+_hasrequireditem = true;
+{
+ _hastoolweapon = _x in weapons player;
+ if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); };
+} count _require;
+
+_hasbuilditem = _this in magazines player;
+if (!_hasbuilditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };
+
+if (!_hasrequireditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_epoch_player_137"),_missing] , "PLAIN DOWN"]; };
+if (_hasrequireditem) then {
+
+ _location = [0,0,0];
+ _isOk = true;
+
+ // get inital players position
+ _location1 = getPosATL player;
+ _dir = getDir player;
+
+ // if ghost preview available use that instead
+ if (_ghost != "") then {
+ _classname = _ghost;
+ };
+
+ _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
+ //Build gizmo
+ _objectHelper = "Sign_sphere10cm_EP1" createVehicle _location;
+ _helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)";
+ _objectHelper setobjecttexture [0,_helperColor];
+ _objectHelper attachTo [player,_offset];
+ _object attachTo [_objectHelper,[0,0,0]];
+ _position = getPosATL _objectHelper;
+
+ //cutText [(localize "str_epoch_player_45"), "PLAIN DOWN"];
+
+ _objHDiff = 0;
+
+if (isClass (configFile >> "SnapBuilding" >> _classname)) then {
+ ["","","",["Init",_object,_classname,_objectHelper]] spawn snap_build;
+};
+
+ while {_isOk} do {
+
+ _zheightchanged = false;
+ _zheightdirection = "";
+ _rotate = false;
+
+ if (DZE_Q) then {
+ DZE_Q = false;
+ _zheightdirection = "up";
+ _zheightchanged = true;
+ };
+ if (DZE_Z) then {
+ DZE_Z = false;
+ _zheightdirection = "down";
+ _zheightchanged = true;
+ };
+ if (DZE_Q_alt) then {
+ DZE_Q_alt = false;
+ _zheightdirection = "up_alt";
+ _zheightchanged = true;
+ };
+ if (DZE_Z_alt) then {
+ DZE_Z_alt = false;
+ _zheightdirection = "down_alt";
+ _zheightchanged = true;
+ };
+ if (DZE_Q_ctrl) then {
+ DZE_Q_ctrl = false;
+ _zheightdirection = "up_ctrl";
+ _zheightchanged = true;
+ };
+ if (DZE_Z_ctrl) then {
+ DZE_Z_ctrl = false;
+ _zheightdirection = "down_ctrl";
+ _zheightchanged = true;
+ };
+ if (DZE_4) then {
+ _rotate = true;
+ DZE_4 = false;
+ if (helperDetach) then {
+ _dir = -45;
+ } else {
+ _dir = 180;
+ };
+ };
+ if (DZE_6) then {
+ _rotate = true;
+ DZE_6 = false;
+ if (helperDetach) then {
+ _dir = 45;
+ } else {
+ _dir = 0;
+ };
+ };
+
+ if (DZE_F and _canDo) then {
+ if (helperDetach) then {
+ _objectHelperDir = getDir _objectHelper;
+ _objectHelper attachTo [player];
+ _objectHelper setDir _objectHelperDir-(getDir player);
+ helperDetach = false;
+ } else {
+ _objectHelperPos = getPosATL _objectHelper;
+ detach _objectHelper;
+ _objectHelper setPosATL _objectHelperPos;
+ _objectHelperDir = getDir _objectHelper;
+ _objectHelper setVelocity [0,0,0]; //fix sliding glitch
+ helperDetach = true;
+ };
+ DZE_F = false;
+ };
+
+ if(_rotate) then {
+ if (helperDetach) then {
+ _objectHelperDir = getDir _objectHelper;
+ _objectHelperPos = getPosATL _objectHelper;
+ _objectHelper setDir _objectHelperDir+_dir;
+ _objectHelper setPosATL _objectHelperPos;
+ } else {
+ _objectHelper setDir _dir;
+ _objectHelper setPosATL _position;
+ //diag_log format["DEBUG Rotate BUILDING POS: %1", _position];
+ };
+
+ };
+
+ if(_zheightchanged) then {
+ if (!helperDetach) then {
+ detach _objectHelper;
+ };
+
+ _position = getPosATL _objectHelper;
+
+ if(_zheightdirection == "up") then {
+ _position set [2,((_position select 2)+0.1)];
+ _objHDiff = _objHDiff + 0.1;
+ };
+ if(_zheightdirection == "down") then {
+ _position set [2,((_position select 2)-0.1)];
+ _objHDiff = _objHDiff - 0.1;
+ };
+
+ if(_zheightdirection == "up_alt") then {
+ _position set [2,((_position select 2)+1)];
+ _objHDiff = _objHDiff + 1;
+ };
+ if(_zheightdirection == "down_alt") then {
+ _position set [2,((_position select 2)-1)];
+ _objHDiff = _objHDiff - 1;
+ };
+
+ if(_zheightdirection == "up_ctrl") then {
+ _position set [2,((_position select 2)+0.01)];
+ _objHDiff = _objHDiff + 0.01;
+ };
+ if(_zheightdirection == "down_ctrl") then {
+ _position set [2,((_position select 2)-0.01)];
+ _objHDiff = _objHDiff - 0.01;
+ };
+
+ _objectHelper setDir (getDir _objectHelper);
+
+ if((_isAllowedUnderGround == 0) && ((_position select 2) < 0)) then {
+ _position set [2,0];
+ };
+
+ _objectHelper setPosATL _position;
+
+ //diag_log format["DEBUG Change BUILDING POS: %1", _position];
+
+ if (!helperDetach) then {
+ _objectHelper attachTo [player];
+ };
+ };
+
+ sleep 0.5;
+
+ _location2 = getPosATL player;
+
+ if(DZE_5) exitWith {
+ _isOk = false;
+ detach _object;
+ _dir = getDir _object;
+ _position = getPosATL _object;
+ //diag_log format["DEBUG BUILDING POS: %1", _position];
+ deleteVehicle _object;
+ detach _objectHelper;
+ deleteVehicle _objectHelper;
+ };
+
+ if(_location1 distance _location2 > 10) exitWith {
+ _isOk = false;
+ _cancel = true;
+ _reason = "You've moved to far away from where you started building (within 10 meters)";
+ detach _object;
+ deleteVehicle _object;
+ detach _objectHelper;
+ deleteVehicle _objectHelper;
+ };
+
+ if(_location1 distance _objectHelperPos > 10) exitWith {
+ _isOk = false;
+ _cancel = true;
+ _reason = "Object is placed to far away from where you started building (within 10 meters)";
+ detach _object;
+ deleteVehicle _object;
+ detach _objectHelper;
+ deleteVehicle _objectHelper;
+ };
+
+ if(abs(_objHDiff) > 10) exitWith {
+ _isOk = false;
+ _cancel = true;
+ _reason = "Cannot move up or down more than 10 meters";
+ detach _object;
+ deleteVehicle _object;
+ detach _objectHelper;
+ deleteVehicle _objectHelper;
+ };
+
+ if (player getVariable["combattimeout", 0] >= time) exitWith {
+ _isOk = false;
+ _cancel = true;
+ _reason = (localize "str_epoch_player_43");
+ detach _object;
+ deleteVehicle _object;
+ detach _objectHelper;
+ deleteVehicle _objectHelper;
+ };
+
+ if (DZE_cancelBuilding) exitWith {
+ _isOk = false;
+ _cancel = true;
+ _reason = "Cancelled building.";
+ detach _object;
+ deleteVehicle _object;
+ detach _objectHelper;
+ deleteVehicle _objectHelper;
+ };
+ };
+
+ //No building on roads unless toggled
+ if (!DZE_BuildOnRoads) then {
+ if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };
+ };
+
+ // No building in trader zones
+ if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
+
+ if(!_cancel) then {
+
+ _classname = _classnametmp;
+
+ // Start Build
+ _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
+
+ _tmpbuilt setdir _dir;
+
+ // Get position based on object
+ _location = _position;
+
+ if((_isAllowedUnderGround == 0) && ((_location select 2) < 0)) then {
+ _location set [2,0];
+ };
+
+ _tmpbuilt setPosATL _location;
+
+
+ cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
+
+ _limit = 3;
+
+ if (DZE_StaticConstructionCount > 0) then {
+ _limit = DZE_StaticConstructionCount;
+ }
+ else {
+ if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
+ _limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
+ };
+ };
+
+ _isOk = true;
+ _proceed = false;
+ _counter = 0;
+
+ while {_isOk} do {
+
+ [10,10] call dayz_HungerThirst;
+ player playActionNow "Medic";
+
+ _dis=20;
+ _sfx = "repair";
+ [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
+ [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
+
+ r_interrupt = false;
+ r_doLoop = true;
+ _started = false;
+ _finished = false;
+
+ while {r_doLoop} do {
+ _animState = animationState player;
+ _isMedic = ["medic",_animState] call fnc_inString;
+ if (_isMedic) then {
+ _started = true;
+ };
+ if (_started && !_isMedic) then {
+ r_doLoop = false;
+ _finished = true;
+ };
+ if (r_interrupt || (player getVariable["combattimeout", 0] >= time)) then {
+ r_doLoop = false;
+ };
+ if (DZE_cancelBuilding) exitWith {
+ r_doLoop = false;
+ };
+ sleep 0.1;
+ };
+ r_doLoop = false;
+
+
+ if(!_finished) exitWith {
+ _isOk = false;
+ _proceed = false;
+ };
+
+ if(_finished) then {
+ _counter = _counter + 1;
+ };
+
+ cutText [format[(localize "str_epoch_player_139"),_text, _counter,_limit], "PLAIN DOWN"];
+
+ if(_counter == _limit) exitWith {
+ _isOk = false;
+ _proceed = true;
+ };
+
+ };
+
+ if (_proceed) then {
+
+ _num_removed = ([player,_item] call BIS_fnc_invRemove);
+ if(_num_removed == 1) then {
+
+ cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
+
+ if (_isPole) then {
+ [] spawn player_plotPreview;
+ };
+
+ _tmpbuilt setVariable ["OEMPos",_location,true];
+
+ if(_lockable > 1) then {
+
+ _combinationDisplay = "";
+
+ switch (_lockable) do {
+
+ case 2: { // 2 lockbox
+ _combination_1 = (floor(random 3)) + 100; // 100=red,101=green,102=blue
+ _combination_2 = floor(random 10);
+ _combination_3 = floor(random 10);
+ _combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
+ dayz_combination = _combination;
+ if (_combination_1 == 100) then {
+ _combination_1_Display = "Red";
+ };
+ if (_combination_1 == 101) then {
+ _combination_1_Display = "Green";
+ };
+ if (_combination_1 == 102) then {
+ _combination_1_Display = "Blue";
+ };
+ _combinationDisplay = format["%1%2%3",_combination_1_Display,_combination_2,_combination_3];
+ };
+
+ case 3: { // 3 combolock
+ _combination_1 = floor(random 10);
+ _combination_2 = floor(random 10);
+ _combination_3 = floor(random 10);
+ _combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
+ dayz_combination = _combination;
+ _combinationDisplay = _combination;
+ };
+
+ case 4: { // 4 safe
+ _combination_1 = floor(random 10);
+ _combination_2 = floor(random 10);
+ _combination_3 = floor(random 10);
+ _combination_4 = floor(random 10);
+ _combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
+ dayz_combination = _combination;
+ _combinationDisplay = _combination;
+ };
+ };
+
+ _tmpbuilt setVariable ["CharacterID",_combination,true];
+
+
+ PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
+ publicVariableServer "PVDZE_obj_Publish";
+
+ cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5];
+ systemChat format [(localize "str_epoch_player_140"),_combinationDisplay,_text];
+
+ } else {
+ _tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
+
+ // fire?
+ if(_tmpbuilt isKindOf "Land_Fire_DZ") then {
+ _tmpbuilt spawn player_fireMonitor;
+ } else {
+ PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
+ publicVariableServer "PVDZE_obj_Publish";
+ };
+ };
+ } else {
+ deleteVehicle _tmpbuilt;
+ cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
+ };
+
+ } else {
+ r_interrupt = false;
+ if (vehicle player == player) then {
+ [objNull, player, rSwitchMove,""] call RE;
+ player playActionNow "stop";
+ };
+
+ deleteVehicle _tmpbuilt;
+
+ cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
+ };
+
+ } else {
+ cutText [format[(localize "str_epoch_player_47"),_text,_reason], "PLAIN DOWN"];
+ };
+};
+
+DZE_ActionInProgress = false;
diff --git a/SQF/dayz_code/actions/snap_build.sqf b/SQF/dayz_code/actions/snap_build.sqf
new file mode 100644
index 000000000..88a2f32ba
--- /dev/null
+++ b/SQF/dayz_code/actions/snap_build.sqf
@@ -0,0 +1,294 @@
+/*-----------------------------------*/
+// by Raymix //
+// July 10 2014 //
+/*--------------------------------*/
+
+private ["_object","_objectSnapGizmo","_objColorActive","_objColorInactive","_classname","_whitelist","_points","_radius","_cfg","_cnt","_pos","_findWhitelisted","_nearbyObject","_posNearby","_selectedAction","_newPos","_pointsNearby","_onWater"];
+//Args
+snapActionState = _this select 3 select 0;
+_object = _this select 3 select 1;
+_classname = _this select 3 select 2;
+_objectHelper = _this select 3 select 3;
+_selectedAction = _this select 3 select 4;
+
+//Snap config file
+_cfg = (configFile >> "SnapBuilding" >> _classname);
+_whitelist = getArray (_cfg >> "snapTo");
+_points = getArray (_cfg >> "points");
+_radius = getNumber (_cfg >> "radius");
+
+//colors
+_objColorActive = "#(argb,8,8,3)color(0,0.92,0.06,1,ca)";
+_objColorInactive = "#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)";
+
+
+fnc_snapActionCleanup = {
+ private ["_s1","_s2","_s3","_cnt"];
+ _s1 = _this select 0;
+ _s2 = _this select 1;
+ _s3 = _this select 2;
+ player removeAction s_player_toggleSnap; s_player_toggleSnap = -1;
+ player removeAction s_player_toggleSnapSelect; s_player_toggleSnapSelect = -1;
+ if (count s_player_toggleSnapSelectPoint != 0) then {{player removeAction _x;} count s_player_toggleSnapSelectPoint; s_player_toggleSnapSelectPoint=[]; snapActions = -1;};
+ if (_s1 > 0) then {
+ s_player_toggleSnap = player addaction [format[("
",_bldTxtClrW,_bldTxtSz,_bldTxtShdw,_bldTxtAlgnL,_bldTxtClrO,_bldTxtUndrln,_bldTxtBold];
+ _bldTxtStringSD = format["
",_bldTxtClrO,_bldTxtClrR,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringSE = format["
",_bldTxtClrO,_bldTxtClrG,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringSA = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringSM = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringPG = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringAPG = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringCPG = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringQE = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringQEF = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringFD = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ _bldTxtStringFS = format["
",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL];
+ switch (_bldTxtSwitch) do {
+ case "init": {
+ _bldTxtFinal = _bldTxtStringTitle + _bldTxtStringSD + _bldTxtStringPG + _bldTxtStringAPG + _bldTxtStringCPG + _bldTxtStringQE + _bldTxtStringQEF + _bldTxtStringFD;
+ };
+ case "OnAuto": {
+ _bldTxtFinal = _bldTxtStringTitle + _bldTxtStringSE + _bldTxtStringSA + _bldTxtStringPG + _bldTxtStringAPG + _bldTxtStringCPG + _bldTxtStringQE + _bldTxtStringQEF + _bldTxtStringFS;
+ };
+ case "manual": {
+ _bldTxtFinal = _bldTxtStringTitle + _bldTxtStringSE + _bldTxtStringSM + _bldTxtStringPG + _bldTxtStringAPG + _bldTxtStringCPG + _bldTxtStringQE + _bldTxtStringQEF + _bldTxtStringFS;
+ };
+ };
+
+ [
+ _bldTxtFinal, //structured text
+ 0.73 * safezoneW + safezoneX, //number - x
+ 0.65 * safezoneH + safezoneY, //number - y
+ 30, //number - duration
+ 1, // number - fade in time
+ 0, // number - delta y
+ 800 //number - layer ID
+ ] spawn bis_fnc_dynamicText;
+ };
+ };
+};
+
+switch (snapActionState) do {
+ case "Init": {
+ ["init",true] call fnc_initSnapTutorial;
+ snapActionState = "OFF";
+ [1,0,0] call fnc_snapActionCleanup;
+ [] spawn {
+ while {true} do {
+ if(!DZE_ActionInProgress) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";};
+ sleep 2;
+ };
+ };
+ };
+ case "OFF": {
+ ["OnAuto",true] call fnc_initSnapTutorial;
+ snapActionState = "ON"; snapActionStateSelect = "Auto";
+ [1,1,0] call fnc_snapActionCleanup;
+ call fnc_initSnapPoints;
+ call fnc_initSnapPointsNearby;
+ sleep 0.25;
+ call fnc_snapDistanceCheck;
+ };
+
+ case "ON": {
+ ["init",true] call fnc_initSnapTutorial;
+ snapActionState = "OFF";
+ [1,0,0] call fnc_snapActionCleanup;
+ call fnc_initSnapPointsCleanup;
+ };
+
+ case "Auto": {
+ ["manual",true] call fnc_initSnapTutorial;
+ snapActionState = "ON";snapActionStateSelect = "Manual";
+ [1,1,1] call fnc_snapActionCleanup;
+ };
+
+ case "Manual": {
+ ["OnAuto",true] call fnc_initSnapTutorial;
+ snapActionState = "ON";snapActionStateSelect = "Auto";
+ [1,1,0] call fnc_snapActionCleanup;
+ };
+
+ case "Selected": { _cnt = 0; _newPos = [];
+{
+ _x setobjecttexture [0,_objColorInactive];
+ if (_cnt == _selectedAction) then {
+ _newPos = [(getPosATL _x select 0),(getPosATL _x select 1),(getPosATL _x select 2)];
+ detach _object;
+ detach _objectHelper;
+ _objectHelper setPosATL _newPos;
+ _object attachTo [_objectHelper];
+ _x setobjecttexture [0,_objColorActive];
+ if (!helperDetach) then {_objectHelper attachTo [player];};
+ };
+ _cnt = _cnt+1;
+}count snapGizmos;
+ };
+};
diff --git a/SQF/dayz_code/actions/trade_items_wo_db.sqf b/SQF/dayz_code/actions/trade_items_wo_db.sqf
index 7984c9ea2..2ba3f85ad 100644
--- a/SQF/dayz_code/actions/trade_items_wo_db.sqf
+++ b/SQF/dayz_code/actions/trade_items_wo_db.sqf
@@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;
-//_activatingPlayer = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+//_activatingPlayer = [player] call FNC_GetPlayerUID;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;
diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf
index 9dd34bdd2..b81feea20 100644
--- a/SQF/dayz_code/actions/trade_weapons.sqf
+++ b/SQF/dayz_code/actions/trade_weapons.sqf
@@ -40,7 +40,7 @@ if(_buy_o_sell == "sell") then {
} else {
// buying item type must NOT exist if rifle || pistol
- _msg = "Drop || sell your current weapon before you can buy a new one.";
+ _msg = "Drop or sell your current weapon before you can buy a new one.";
_config = (configFile >> "CfgWeapons" >> _part_out);
_configName = configName(_config);
_wepType = getNumber(_config >> "Type");
@@ -64,7 +64,7 @@ if(_buy_o_sell == "sell") then {
};
if(_isToolBelt || _isBinocs) then {
_abort = (_configName in (weapons player));
- _msg = "Drop || sell your current toolbelt item before you can buy a new one.";
+ _msg = "Drop or sell your current toolbelt item before you can buy a new one.";
};
};
diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf
index 4884f6e7f..6f01bf26b 100644
--- a/SQF/dayz_code/compile/fn_unconscious.sqf
+++ b/SQF/dayz_code/compile/fn_unconscious.sqf
@@ -11,7 +11,9 @@ if ((!r_player_handler1) && (r_handlerCount == 0)) then {
_timeout = 0;
r_handlerCount = r_handlerCount + 1;
r_player_handler1 = true;
- player playAction "CanNotMove";
+ if (vehicle player == player) then {
+ player playAction "CanNotMove";
+ };
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0;
"colorCorrections" ppEffectEnable true;"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;
0 fadeSound 0.05;
diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf
index d794023ee..d6046fbcd 100644
--- a/SQF/dayz_code/compile/player_death.sqf
+++ b/SQF/dayz_code/compile/player_death.sqf
@@ -12,7 +12,7 @@ if (dialog) then {closeDialog 0;};
if (visibleMap) then {openMap false;};
_body = player;
-_playerID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+_playerID = [player] call FNC_GetPlayerUID;
disableUserInput true;
//add weapon on back to player...
diff --git a/SQF/dayz_code/compile/player_switchModel.sqf b/SQF/dayz_code/compile/player_switchModel.sqf
index bc928712a..41a8e954d 100644
--- a/SQF/dayz_code/compile/player_switchModel.sqf
+++ b/SQF/dayz_code/compile/player_switchModel.sqf
@@ -1,11 +1,11 @@
private ["_weapons","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_tagSetting","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_playerObjName","_wpnType","_ismelee"];
-
+if (gear_done) then {disableUserInput true;};
_class = _this;
_position = getPosATL player;
_dir = getDir player;
_currentAnim = animationState player;
_tagSetting = player getVariable["DZE_display_name",false];
-_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+_playerUID = [player] call FNC_GetPlayerUID;
_weapons = weapons player;
_countMags = call player_countMagazines;
_magazines = _countMags select 0;
@@ -16,11 +16,11 @@ _primweapon = primaryWeapon player;
_secweapon = secondaryWeapon player;
if(!(_primweapon in _weapons) && _primweapon != "") then {
- _weapons = _weapons + [_primweapon];
+ _weapons set [(count _weapons), _primweapon];
};
if(!(_secweapon in _weapons) && _secweapon != "") then {
- _weapons = _weapons + [_secweapon];
+ _weapons set [(count _weapons), _secweapon];
};
//BackUp Backpack
@@ -127,6 +127,7 @@ if (!isNil "_newBackpackType") then {
[] call _switchUnit;
if (gear_done) then {sleep 0.001;};
["1"] call gearDialog_create;
+ if (gear_done) then {sleep 0.001;};
//magazines
_countr = 0;
{
@@ -147,6 +148,7 @@ if (!isNil "_newBackpackType") then {
};
} count _backpackMag;
(findDisplay 106) closeDisplay 0;
+ if (gear_done) then {sleep 0.001; disableUserInput false;};
_countr = 0;
{
(unitBackpack player) addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
@@ -156,26 +158,14 @@ if (!isNil "_newBackpackType") then {
} else { [] call _switchUnit; };
[objNull, player, rSwitchMove,_currentAnim] call RE;
player disableConversation true;
-
-//player setVariable ["bodyName",dayz_playerName,true]; //Outcommit (Issue #991) - Also removed in DayZ Mod 1.8
-
if (_tagSetting) then {
DZE_ForceNameTags = true;
};
-/*
-_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
-_playerObjName = format["PVDZE_player%1",_playerUID];
-call compile format["%1 = player;",_playerObjName];
-publicVariableServer _playerObjName;
-*/
-
-//melee check
_wpnType = primaryWeapon player;
_ismelee = (gettext (configFile >> "CfgWeapons" >> _wpnType >> "melee"));
if (_ismelee == "true") then {
call dayz_meleeMagazineCheck;
};
-//reveal the same objects we do on login
{player reveal _x} count (nearestObjects [getPosATL player, dayz_reveal, 50]);
diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf
index 3696e1933..2c30ada89 100644
--- a/SQF/dayz_code/compile/player_unlockVault.sqf
+++ b/SQF/dayz_code/compile/player_unlockVault.sqf
@@ -39,7 +39,7 @@ if ((_ownerID == dayz_combination) || (_ownerID == dayz_playerUID)) then {
// Check if any players are nearby if not allow player to claim item.
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
- _playerID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+ _playerID = [player] call FNC_GetPlayerUID;
// Only allow if not already claimed.
if (_claimedBy == "0" || !_playerNear) then {
diff --git a/SQF/dayz_code/compile/player_updateGui.sqf b/SQF/dayz_code/compile/player_updateGui.sqf
index 9d7bba2f4..f0c245b9e 100644
--- a/SQF/dayz_code/compile/player_updateGui.sqf
+++ b/SQF/dayz_code/compile/player_updateGui.sqf
@@ -87,32 +87,49 @@ if (!canStand player) then {
/*
Flashing:
*/
-if (_combatVal == 1) then {
- _ctrlCombat call player_guiControlFlash;
+_ctrl_Array=[];
+if (_combatVal > 0) then {
+ _ctrl_Array=_ctrl_Array + [_ctrlCombat];
+}else {
+ _ctrlCombat ctrlShow true;
};
-if (_bloodVal < 0.2) then {
- _ctrlBlood call player_guiControlFlash;
+
+if (_bloodVal < 0.4) then {
+ _ctrl_Array=_ctrl_Array + [_ctrlBlood];
+}else {
+ _ctrlBlood ctrlShow true;
};
+
if (_thirstVal > 0.8) then {
- _ctrlThirst call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlThirst];
+}else {
+ _ctrlThirst ctrlShow true;
};
if (_foodVal > 0.8) then {
- _ctrlFood call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlFood];
+}else {
+ _ctrlFood ctrlShow true;
};
if (_tempVal < 0.2) then { //TeeChange
- _ctrlTemp call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlTemp];
} else {
_ctrlTemp ctrlShow true;
};
if (r_player_injured) then {
- _ctrlBleed call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlBleed];
+}else {
+ _ctrlBleed ctrlShow false;
};
+if((count _ctrl_Array) > 0) then
+{
+_ctrl_Array call player_guiControlFlash;
+};
}
@@ -226,30 +243,48 @@ if (!canStand player) then {
/*
Flashing:
*/
+_ctrl_Array=[];
if (_combatVal == 0) then {
- _ctrlCombat call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlCombat];
+}else {
+ _ctrlCombat ctrlShow true;
};
-if (_bloodVal < 0.2) then {
- _ctrlBlood call player_guiControlFlash;
+
+if (_bloodVal < 0.4) then {
+ _ctrl_Array=_ctrl_Array + [_ctrlBlood];
+}else {
+ _ctrlBlood ctrlShow true;
};
+
if (_thirstVal < 0.2) then {
- _ctrlThirst call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlThirst];
+}else {
+ _ctrlThirst ctrlShow true;
};
if (_foodVal < 0.2) then {
- _ctrlFood call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlFood];
+}else {
+ _ctrlFood ctrlShow true;
};
if (_tempVal > 0.8) then { //TeeChange
- _ctrlTemp call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlTemp];
} else {
_ctrlTemp ctrlShow true;
};
if (r_player_injured) then {
- _ctrlBleed call player_guiControlFlash;
+ _ctrl_Array=_ctrl_Array + [_ctrlBleed];
+}else {
+ _ctrlBleed ctrlShow false;
+};
+
+if((count _ctrl_Array) > 0) then
+{
+_ctrl_Array call player_guiControlFlash;
};
diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp
index becabf882..db6405fcd 100644
--- a/SQF/dayz_code/config.cpp
+++ b/SQF/dayz_code/config.cpp
@@ -97,5 +97,6 @@ class CfgAddons
#include "Configs\CfgAmmo.hpp"
#include "Configs\CfgLoot\CfgBuildingLoot.hpp"
#include "Configs\CfgArma.hpp"
+#include "Configs\CfgExtra\snappoints.hpp"
#include "external\R3F_Realism\R3F_Weight\R3F_CfgWeight.h"
\ No newline at end of file
diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf
index b7950d631..9689e0433 100644
--- a/SQF/dayz_code/init/compiles.sqf
+++ b/SQF/dayz_code/init/compiles.sqf
@@ -35,14 +35,14 @@ if (!isDedicated) then {
[["Hedgehog_DZ"], 1,"STR_EPOCH_ACTIONS_14"] call player_removeNearby;
};
player_removeNet = {
- [["DesertLargeCamoNet","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ"], 5,"str_epoch_player_8"] call player_removeNearby;
+ [["DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ"], 5,"str_epoch_player_8"] call player_removeNearby;
};
player_login = {
private ["_unit","_detail","_PUID"];
_unit = _this select 0;
_detail = _this select 1;
- _PUID = if (DayZ_UseSteamID) then {GetPlayerUID player} else {GetPlayerUIDOld player};
+ _PUID = [player] call FNC_GetPlayerUID;
if(_unit == _PUID) then {
player setVariable["publish",_detail];
};
@@ -106,7 +106,13 @@ if (!isDedicated) then {
player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
player_antiWall = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_antiWall.sqf";
player_deathBoard = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\list_playerDeathsAlt.sqf";
-
+
+ //Snap building - disabled by default, not sure about your stance towards this mod yet, feel free to edit
+ if (DZE_snapBuilding) then {
+ player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build2.sqf";
+ snap_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\snap_build.sqf";
+ };
+
player_plotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_showPlotRadius.sqf";
player_upgradeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_upgradeVehicle.sqf";
@@ -279,15 +285,15 @@ if (!isDedicated) then {
};
};
- player_guiControlFlash = {
- private["_control"];
- _control = _this;
- if (ctrlShown _control) then {
- _control ctrlShow false;
- } else {
- _control ctrlShow true;
- };
- };
+ player_guiControlFlash = {
+ private["_control"];
+ _control = _this;
+ if (ctrlShown (_control select 0)) then {
+ {_x ctrlShow false} foreach _control;
+ } else {
+ {_x ctrlShow true} foreach _control;
+ };
+ };
gearDialog_create = {
private ["_i","_dialog"];
@@ -528,6 +534,22 @@ if (!isDedicated) then {
spawn_loot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
spawn_loot_small = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot_small.sqf";
// player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
+ FNC_GetPlayerUID = {
+ private ["_object","_version","_PID"];
+ _object = _this select 0;
+ _version = productVersion select 3;
+ if (DayZ_UseSteamID) then {
+ _PID = GetPlayerUID _object;
+ } else {
+ if (_version >= 125548) then {
+ _PID = call (compile "GetPlayerUIDOld _object");
+ } else {
+ _PID = GetPlayerUID _object;
+ diag_log format["Your game version, %1, is less than the required for the old UID system; using Steam ID system instead. Update to 1.63.125548 (or latest steam beta)", _version];
+ };
+ };
+ _PID;
+ };
FNC_GetSetPos = { //DO NOT USE IF YOU NEED ANGLE COMPENSATION!!!!
private "_pos";
_thingy = _this select 0;
@@ -614,4 +636,4 @@ if (!isDedicated) then {
eh_localCleanup = {};
};
-initialized = true;
\ No newline at end of file
+initialized = true;
diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf
index d0b3d81e9..c87cc6bbc 100644
--- a/SQF/dayz_code/init/variables.sqf
+++ b/SQF/dayz_code/init/variables.sqf
@@ -257,6 +257,10 @@ dayz_resetSelfActions = {
s_player_heli_lift = -1;
s_player_heli_detach = -1;
s_player_lockUnlock_crtl = -1;
+ s_player_toggleSnap = -1;
+ s_player_toggleSnapSelect = -1;
+ s_player_toggleSnapSelectPoint=[];
+ snapActions = -1;
};
call dayz_resetSelfActions;
@@ -534,6 +538,12 @@ if(isNil "DZE_StaticConstructionCount") then {
if (isNil "DZE_selfTransfuse_Values") then {
DZE_selfTransfuse_Values = [12000, 15, 300];
};
+if (isNil "DZE_snapBuilding") then {
+ DZE_snapBuilding = false;
+};
+if (isNil "helperDetach") then {
+ helperDetach = false;
+};
// needed on server
if(isNil "DZE_PlotPole") then {
@@ -782,6 +792,8 @@ if(!isDedicated) then {
DZE_5 = false;
DZE_4 = false;
DZE_6 = false;
+
+ DZE_F = false;
DZE_cancelBuilding = false;
DZE_PZATTACK = false;
diff --git a/SQF/dayz_code/medical/setup_functions_med.sqf b/SQF/dayz_code/medical/setup_functions_med.sqf
index a15009e3b..5c48d17a0 100644
--- a/SQF/dayz_code/medical/setup_functions_med.sqf
+++ b/SQF/dayz_code/medical/setup_functions_med.sqf
@@ -260,7 +260,9 @@ fnc_usec_recoverUncons = {
sleep 1;
disableUserInput false;
- [objNull,player,rSwitchMove,"AinjPpneMstpSnonWnonDnon"] call RE;
- player switchMove "AinjPpneMstpSnonWnonDnon";
- player playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
+ if (vehicle player == player) then {
+ [objNull,player,rSwitchMove,"AinjPpneMstpSnonWnonDnon"] call RE;
+ player switchMove "AinjPpneMstpSnonWnonDnon";
+ player playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
+ };
};
\ No newline at end of file
diff --git a/SQF/dayz_code/system/antihack.sqf b/SQF/dayz_code/system/antihack.sqf
index 8e279bc9c..53134561c 100644
--- a/SQF/dayz_code/system/antihack.sqf
+++ b/SQF/dayz_code/system/antihack.sqf
@@ -9,7 +9,7 @@ waitUntil {vehicle player == player};
[] spawn {
private ["_playerName","_playerUID"];
_playerName = name player;
- _playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+ _playerUID = [player] call FNC_GetPlayerUID;
while {1 == 1} do {
if (typeName player != "OBJECT") then {
PVDZE_atp = format["WARNING typename error for player UID#%1", _playerUID];
@@ -24,7 +24,7 @@ waitUntil {vehicle player == player};
[] spawn {
_playerName = name player;
- _playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+ _playerUID = [player] call FNC_GetPlayerUID;
while {true} do {
sleep 5;
};
@@ -93,7 +93,7 @@ while {1 == 1} do {
if (_lastVehicle == vehicle player) then {
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) || (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
(vehicle player) setposATL _lastpos;
- _PUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
+ _PUID = [player] call FNC_GetPlayerUID;
PVDZE_atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", _PUID, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player];
publicVariableServer "PVDZE_atp";
} else {
diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm
index a2f7961b3..922608740 100644
--- a/SQF/dayz_code/system/player_monitor.fsm
+++ b/SQF/dayz_code/system/player_monitor.fsm
@@ -408,7 +408,7 @@ class FSM
"" \n
"progressLoadingScreen 0.3;" \n
"" \n
- "_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};"/*%FSM*/;
+ "_playerUID = [player] call FNC_GetPlayerUID;"/*%FSM*/;
precondition = /*%FSM
+ +\ No newline at end of file