mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
91e4a80ae2
Otherwise it is possible to unlock foreign Doors / Gates while controling an UAV. If you control an UAV, cameraon will check the Plotpoles near the UAV.
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
/*
|
|
Author: Aaron Clark - EpochMod.com
|
|
|
|
Contributors:
|
|
|
|
Description:
|
|
Base building object lock check code
|
|
|
|
Licence:
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
Github:
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/building/EPOCH_lockCheck.sqf
|
|
|
|
Example:
|
|
call EPOCH_lockCheck
|
|
|
|
Parameter(s):
|
|
NONE
|
|
|
|
Returns:
|
|
BOOL
|
|
*/
|
|
//[[[cog import generate_private_arrays ]]]
|
|
private ["_buildingJammerRange","_config","_jammed","_jammer"];
|
|
//[[[end]]]
|
|
|
|
_config = "CfgEpochClient" call EPOCH_returnConfig;
|
|
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
|
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
|
|
|
_jammer = nearestObjects[cameraon, ["PlotPole_EPOCH"], _buildingJammerRange];
|
|
_jammed = false;
|
|
if !(_jammer isEqualTo[]) then {
|
|
{
|
|
if (alive _x) then {
|
|
_jammed = !((_x getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID]);
|
|
};
|
|
if (_jammed) exitWith{};
|
|
} forEach _jammer;
|
|
};
|
|
_jammed
|