diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index 99995acc8..338144028 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -15,7 +15,6 @@ _needText = localize "str_epoch_player_246"; _playerUID = [player] call FNC_GetPlayerUID; _canBuildOnPlot = false; _plotcheck = [player, false] call FNC_find_plots; -_distance = _plotcheck select 0; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index a1c2f62c1..4c86960a7 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -2,7 +2,7 @@ DayZ Base Building Upgrades Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_distance","_needText","_findNearestPoles","_findNearestPole","_IsNearPlot"]; +private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_canBuildOnPlot","_nearestPole","_ownerID","_distance","_needText","_IsNearPlot"]; if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;}; DZE_ActionInProgress = true; @@ -14,7 +14,6 @@ _needText = localize "str_epoch_player_246"; _canBuildOnPlot = false; _plotcheck = [player, false] call FNC_find_plots; -_distance = _plotcheck select 0; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; @@ -25,18 +24,11 @@ if(_IsNearPlot == 0) then { if(dayz_characterID == _ownerID) then { _canBuildOnPlot = true; } else { - if (DZE_permanentPlot) then { - _buildcheck = [player, _nearestPole] call FNC_check_access; - _isowner = _buildcheck select 0; - _isfriendly = ((_buildcheck select 1) or (_buildcheck select 3)); - if (_isowner || _isfriendly) then { - _canBuildOnPlot = true; - }; - } else { - _friendlies = player getVariable ["friendlyTo",[]]; - if(_ownerID in _friendlies) then { - _canBuildOnPlot = true; - }; + _buildcheck = [player, _nearestPole] call FNC_check_access; + _isowner = _buildcheck select 0; + _isfriendly = ((_buildcheck select 1) or (_buildcheck select 3)); + if (_isowner || _isfriendly) then { + _canBuildOnPlot = true; }; }; }; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index dd87e505f..f3f8ff5f5 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -4,7 +4,7 @@ DZE_ActionInProgress = true; delete object from db with extra waiting by [VB]AWOL parameters: _obj */ -private ["_activatingPlayer","_obj","_playerUID","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"]; +private ["_activatingPlayer","_obj","_playerUID","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_ownerID","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"]; player removeAction s_player_deleteBuild; s_player_deleteBuild = 1; @@ -54,7 +54,6 @@ else { }; _plotcheck = [player, false] call FNC_find_plots; -_distance = _plotcheck select 0; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf index 67a5386b1..c33cee758 100644 --- a/SQF/dayz_code/compile/dze_buildChecks.sqf +++ b/SQF/dayz_code/compile/dze_buildChecks.sqf @@ -21,12 +21,9 @@ _canBuild = false; _nearestPole = objNull; _ownerID = 0; _friendlies = []; - -_distance = DZE_PlotPole select 0; _needText = localize "str_epoch_player_246"; _plotcheck = [player, false] call FNC_find_plots; -_distance = _plotcheck select 0; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2;