From 7933600fea8146a38fad3e687c4d7d7b8e07f3bb Mon Sep 17 00:00:00 2001 From: A Man Date: Thu, 24 Mar 2022 13:06:58 +0100 Subject: [PATCH] Remove unneeded CharacterID check --- SQF/dayz_code/compile/fn_check_access.sqf | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/SQF/dayz_code/compile/fn_check_access.sqf b/SQF/dayz_code/compile/fn_check_access.sqf index bde8e3229..502a6e4bd 100644 --- a/SQF/dayz_code/compile/fn_check_access.sqf +++ b/SQF/dayz_code/compile/fn_check_access.sqf @@ -37,7 +37,6 @@ private [ ,"_targetType" // return value ,"_targetOwnerUID" // UID or characterID of the owner of _target ,"_playerUID" // UID of the _player - ,"_characterID" // characterID of the _player ,"_plotcheck" // takes return value of FNC_find_plots ,"_isNearPlot" // player is in plot's reach ,"_nearestPlot" // plot object @@ -61,15 +60,12 @@ _isDoorFriend = false; _isDoorAdmin = false; _targetType = ""; - // determine target type _targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GENERIC"; }; - // determine owner and player id // and check if player is owner of target object _playerUID = getPlayerUID _player; -_characterID = player getVariable ["CharacterID","0"]; _targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] }; _isOwner = (_playerUID == _targetOwnerUID); @@ -78,11 +74,11 @@ _isOwner = (_playerUID == _targetOwnerUID); _friendlies = _player getVariable ["friendlyTo",[]]; _isFriendly = (_targetOwnerUID in _friendlies); - // find nearest plot _plotcheck = [_player, false] call FNC_find_plots; _isNearPlot = ((_plotcheck select 1) > 0); _nearestPlot = _plotcheck select 2; + if(_isNearPlot) then { // determine plot owner // and check if player is owner of plot @@ -103,7 +99,6 @@ if(_isNearPlot) then { if(_playerUID in DZE_PlotManagementAdmins) then { _isPlotAdmin = true; }; }; - // Process target type DOOR if(_targetType == "DOOR") then { // determine door friends @@ -120,7 +115,6 @@ if(_targetType == "DOOR") then { if(_playerUID in DZE_DoorManagementAdmins) then { _isDoorAdmin = true; }; }; - // RESULT [ _isOwner , _isFriendly