From 38f7e1d1c302c6903cdb2e72bfb7de78e6a41aa8 Mon Sep 17 00:00:00 2001 From: A Man Date: Thu, 5 May 2022 17:54:04 +0200 Subject: [PATCH] Remove player_projectileNear it is not used anymore --- .../compile/player_projectileNear.sqf | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 SQF/dayz_code/compile/player_projectileNear.sqf diff --git a/SQF/dayz_code/compile/player_projectileNear.sqf b/SQF/dayz_code/compile/player_projectileNear.sqf deleted file mode 100644 index c0b49ecb6..000000000 --- a/SQF/dayz_code/compile/player_projectileNear.sqf +++ /dev/null @@ -1,53 +0,0 @@ -private["_unit","_projectile","_isInComat","_listNear","_callCount","_projectilespeed","_projectflight","_currentNear","_nearVehicle","_isInCombat"]; -_unit = _this select 0; -_projectile = _this select 6; - -//diag_log ("0"); - -//_isInComat = _unit getVariable["startcombattimer",0]; - -//diag_log ("Bullit Speed: " +str(Speed _projectile)); -//diag_log ("Bullit Velocity: " +str(velocity _projectile)); - -_listNear = []; -_callCount = 0; - -//approx 1020 meters -while {(alive _projectile) && !(isNull _projectile) && (_callCount < 85)} do { - _projectilespeed = Speed _projectile; - _projectflight = (((_projectilespeed / 60) * 1000)); - if (_projectflight > 0) then { - uiSleep (12 / (_projectflight)); - }; - if (alive _projectile && !(isNull _projectile)) then {_currentNear = (getPosATL _projectile) nearEntities [["CAManBase","AllVehicles"],15];}; - _listNear = _listNear + _currentNear; - _callCount = _callCount + 1; -}; -//diag_log ("2"); -{ - _nearVehicle = _x; - _listNear = _listNear - [_x]; - - //diag_log ("3"); - - if (isPlayer _nearVehicle) then { - _isInCombat = _nearVehicle getVariable["startcombattimer",0]; - if ((alive _nearVehicle) and _isInCombat == 0) then { - _nearVehicle setVariable["startcombattimer", 1]; - _nearVehicle setVariable["inCombat", true, true]; - diag_log("Now in Combat (Player): " + name _unit); - }; - }; - - if (_nearVehicle isKindOf "AllVehicles") then { - { - _isInCombat = _x getVariable["startcombattimer",0]; - if (isPlayer _x and _isInCombat == 0 and alive _x) then { - _x setVariable["startcombattimer", 1]; - _x setVariable["inCombat", true, true]; - diag_log("Now in Combat (Crew): " + name _x); - }; - } forEach (crew _nearVehicle); - }; - -} forEach _listNear;