diff --git a/SQF/dayz_code/actions/maintain_area.sqf b/SQF/dayz_code/actions/maintain_area.sqf index 0a21c396d..7df08da93 100644 --- a/SQF/dayz_code/actions/maintain_area.sqf +++ b/SQF/dayz_code/actions/maintain_area.sqf @@ -22,13 +22,6 @@ dayz_actionInProgress = true; private ["_maintain","_req","_target","_objects","_requirements","_count","_objects_filtered","_message1","_message2","_option","_line1","_line2","_plotDialog"]; -player removeAction s_player_maintain_area; -s_player_maintain_area = 1; -player removeAction s_player_maintain_area_force; -s_player_maintain_area_force = 1; -player removeAction s_player_maintain_area_preview; -s_player_maintain_area_preview = 1; - _target = (([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15]) select 0; _objects = nearestObjects [_target, DZE_maintainClasses, DZE_maintainRange]; @@ -124,7 +117,7 @@ _maintain = { }; } count _objects; -_option = if (typeName _this == "ARRAY") then {_this select 3} else {_this}; +_option = _this; call { if (_option == "maintain") exitwith { diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index ff1f7b55f..1b5f14dcc 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -533,12 +533,6 @@ if (!isNull _cursorTarget && _noChange && !_inVehicle && !_isPZombie && _canDo & } else { player removeAction s_player_plotManagement; s_player_plotManagement = -1; - player removeAction s_player_maintain_area; - s_player_maintain_area = -1; - player removeAction s_player_maintain_area_force; - s_player_maintain_area_force = -1; - player removeAction s_player_maintain_area_preview; - s_player_maintain_area_preview = -1; player removeAction s_player_plot_boundary; s_player_plot_boundary = -1; }; @@ -1117,12 +1111,6 @@ if (!isNull _cursorTarget && _noChange && !_inVehicle && !_isPZombie && _canDo & s_player_lockUnlock_crtl = -1; player removeAction s_player_SurrenderedGear; s_player_SurrenderedGear = -1; - player removeAction s_player_maintain_area; - s_player_maintain_area = -1; - player removeAction s_player_maintain_area_force; - s_player_maintain_area_force = -1; - player removeAction s_player_maintain_area_preview; - s_player_maintain_area_preview = -1; player removeAction s_player_tamedog; s_player_tamedog = -1; player removeAction s_player_feeddog; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 6ba1bf712..09c987c86 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -192,9 +192,6 @@ if (!isDedicated) then { s_player_downgrade_build = -1; s_halo_action = -1; s_player_SurrenderedGear = -1; - s_player_maintain_area = -1; - s_player_maintain_area_force = -1; - s_player_maintain_area_preview = -1; s_player_heli_lift = -1; s_player_heli_detach = -1; s_player_lockUnlock_crtl = -1; @@ -510,4 +507,7 @@ if (!isDedicated) then { ]; dayz_insideBuilding = objNull; // building name the player is currently inside of, or objNull if player is outside DZE_insideExceptions = ["Garage_Green_DZ","Garage_White_DZ","Garage_Brown_DZ","Garage_Grey_DZ","Wooden_shed_DZ","Wooden_shed2_DZ","WoodShack_DZ","WoodShack2_DZ","StorageShed_DZ","StorageShed2_DZ","Concrete_Bunker_DZ","Concrete_Bunker_Locked_DZ","SandNestLarge_DZ"]; // list of base-building objects that allow checking if player is inside (fnc_isInsideBuilding) + DZE_sheltered = 0.0; // used in determining how much a player is sheltered from the environment + DZE_roofOverhead = false; + DZE_allTrees = dayz_trees + ["b_craet1.p3d"]; // include shrubs that the player can hide in };