mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
snap code optimization, vault points added
This commit is contained in:
@@ -371,4 +371,20 @@ class SnapBuilding {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
class WoodLadder_DZ: WoodLadder_Preview_DZ{};
|
class WoodLadder_DZ: WoodLadder_Preview_DZ{};
|
||||||
|
|
||||||
|
class VaultStorageLocked {
|
||||||
|
snapTo[] = {
|
||||||
|
"VaultStorageLocked",
|
||||||
|
"VaultStorage"
|
||||||
|
};
|
||||||
|
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 {};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ fnc_snapActionCleanup = {
|
|||||||
_s1 = _this select 0;
|
_s1 = _this select 0;
|
||||||
_s2 = _this select 1;
|
_s2 = _this select 1;
|
||||||
_s3 = _this select 2;
|
_s3 = _this select 2;
|
||||||
player removeAction s_player_toggleSnap;
|
player removeAction s_player_toggleSnap; s_player_toggleSnap = -1;
|
||||||
player removeAction s_player_toggleSnapSelect;
|
player removeAction s_player_toggleSnapSelect; s_player_toggleSnapSelect = -1;
|
||||||
{player removeAction _x;} count s_player_toggleSnapSelectPoint;
|
if (count s_player_toggleSnapSelectPoint != 0) then {{player removeAction _x;} count s_player_toggleSnapSelectPoint; s_player_toggleSnapSelectPoint=[]; snapActions = -1;};
|
||||||
if (_s1 > 0) then {
|
if (_s1 > 0) then {
|
||||||
s_player_toggleSnap = player addaction [format[("<t color=""#ffffff"">" + ("Snap: %1") +"</t>"),snapActionState],"\z\addons\dayz_code\actions\snap_build.sqf",[snapActionState,_object,_classname,_objectHelper],6,false,true];
|
s_player_toggleSnap = player addaction [format[("<t color=""#ffffff"">" + ("Snap: %1") +"</t>"),snapActionState],"\z\addons\dayz_code\actions\snap_build.sqf",[snapActionState,_object,_classname,_objectHelper],6,false,true];
|
||||||
};
|
};
|
||||||
@@ -58,7 +58,7 @@ fnc_initSnapPoints = {
|
|||||||
fnc_initSnapPointsNearby = {
|
fnc_initSnapPointsNearby = {
|
||||||
_pos = getPosATL _object;
|
_pos = getPosATL _object;
|
||||||
_findWhitelisted = []; _pointsNearby = [];
|
_findWhitelisted = []; _pointsNearby = [];
|
||||||
_findWhitelisted = nearestObjects [_pos,_whitelist,15]-[_object];
|
_findWhitelisted = nearestObjects [_pos,_whitelist,10]-[_object];
|
||||||
snapGizmosNearby = [];
|
snapGizmosNearby = [];
|
||||||
{
|
{
|
||||||
_nearbyObject = _x;
|
_nearbyObject = _x;
|
||||||
@@ -223,8 +223,8 @@ fnc_initSnapTutorial = {
|
|||||||
|
|
||||||
[
|
[
|
||||||
_bldTxtFinal, //structured text
|
_bldTxtFinal, //structured text
|
||||||
[0.73 * safezoneW + safezoneX], //number - x
|
0.73 * safezoneW + safezoneX, //number - x
|
||||||
[0.65 * safezoneH + safezoneY], //number - y
|
0.65 * safezoneH + safezoneY, //number - y
|
||||||
30, //number - duration
|
30, //number - duration
|
||||||
1, // number - fade in time
|
1, // number - fade in time
|
||||||
0, // number - delta y
|
0, // number - delta y
|
||||||
|
|||||||
@@ -257,6 +257,10 @@ dayz_resetSelfActions = {
|
|||||||
s_player_heli_lift = -1;
|
s_player_heli_lift = -1;
|
||||||
s_player_heli_detach = -1;
|
s_player_heli_detach = -1;
|
||||||
s_player_lockUnlock_crtl = -1;
|
s_player_lockUnlock_crtl = -1;
|
||||||
|
s_player_toggleSnap = -1;
|
||||||
|
s_player_toggleSnapSelect = -1;
|
||||||
|
s_player_toggleSnapSelectPoint=[];
|
||||||
|
snapActions = -1;
|
||||||
};
|
};
|
||||||
call dayz_resetSelfActions;
|
call dayz_resetSelfActions;
|
||||||
|
|
||||||
@@ -534,6 +538,9 @@ if(isNil "DZE_StaticConstructionCount") then {
|
|||||||
if (isNil "DZE_selfTransfuse_Values") then {
|
if (isNil "DZE_selfTransfuse_Values") then {
|
||||||
DZE_selfTransfuse_Values = [12000, 15, 300];
|
DZE_selfTransfuse_Values = [12000, 15, 300];
|
||||||
};
|
};
|
||||||
|
if (isNil "DZE_snapBuilding") then {
|
||||||
|
DZE_snapBuilding = false;
|
||||||
|
};
|
||||||
|
|
||||||
// needed on server
|
// needed on server
|
||||||
if(isNil "DZE_PlotPole") then {
|
if(isNil "DZE_PlotPole") then {
|
||||||
|
|||||||
Reference in New Issue
Block a user