mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Little bit Performance ++
This commit is contained in:
@@ -15,20 +15,6 @@ _inVehicle = (_vehicle != player);
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
// ---------------------------------------Maintain Area Start------------------------------------
|
||||
if (_canDo && (speed player <= 1) && (cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
|
||||
if (s_player_maintain_area < 0) then {
|
||||
s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
|
||||
s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_maintain_area;
|
||||
s_player_maintain_area = -1;
|
||||
player removeAction s_player_maintain_area_preview;
|
||||
s_player_maintain_area_preview = -1;
|
||||
};
|
||||
// ---------------------------------------Maintain Area End------------------------------------
|
||||
|
||||
_nearLight = nearestObject [player,"LitObject"];
|
||||
_canPickLight = false;
|
||||
if (!isNull _nearLight) then {
|
||||
@@ -203,6 +189,18 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
_player_deleteBuild = false;
|
||||
_player_lockUnlock_crtl = false;
|
||||
|
||||
if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
|
||||
if (s_player_maintain_area < 0) then {
|
||||
s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
|
||||
s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_maintain_area;
|
||||
s_player_maintain_area = -1;
|
||||
player removeAction s_player_maintain_area_preview;
|
||||
s_player_maintain_area_preview = -1;
|
||||
};
|
||||
|
||||
// CURSOR TARGET ALIVE
|
||||
if(_isAlive) then {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user