From 9931e6958b08a43fe30c9e54c9d5b15c6194e06d Mon Sep 17 00:00:00 2001 From: dayz10k Date: Tue, 26 Nov 2013 13:55:24 -0500 Subject: [PATCH] Area Maintenance --- SQF/dayz_code/compile/fn_selfActions.sqf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 63102af22..357ecbe37 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -15,6 +15,20 @@ _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 ["Maintain Area", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false]; + s_player_maintain_area_preview = player addAction ["Maintain Area Preview", "\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 {