mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Update private tags
From
e69f8d5306
Moved dog files to the \dog\ folder and pzombie files to the \pzombie\
folder. Also removed some legacy files that are no longer used.
The actions\ and compile\ folders are fully up to date now
This commit is contained in:
@@ -1,49 +1,49 @@
|
||||
private ["_unit","_projectile","_isInCombat","_currentNear","_projectilespeed","_projectflight","_listNear","_callCount","_nearVehicle"];
|
||||
_unit = _this select 0;
|
||||
_projectile = _this select 6;
|
||||
private ["_currentNear","_listNear","_callCount"];
|
||||
_unit = _this select 0;
|
||||
_projectile = _this select 6;
|
||||
|
||||
//diag_log ("0");
|
||||
diag_log ("0");
|
||||
|
||||
//_isInComat = _unit getVariable["startcombattimer",0];
|
||||
|
||||
//diag_log ("Bullit Speed: " +str(Speed _projectile));
|
||||
//diag_log ("Bullit Velocity: " +str(velocity _projectile));
|
||||
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 {
|
||||
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 = ([_projectile] call FNC_GetPos) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||
if (alive _projectile && !(isNull _projectile)) then {_currentNear = (getPosATL _projectile) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||
_listNear = _listNear + _currentNear;
|
||||
_callCount = _callCount + 1;
|
||||
};
|
||||
//diag_log ("2");
|
||||
diag_log ("2");
|
||||
{
|
||||
_nearVehicle = _x;
|
||||
_listNear = _listNear - [_x];
|
||||
|
||||
//diag_log ("3");
|
||||
diag_log ("3");
|
||||
|
||||
if (isPlayer _nearVehicle) then {
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
if ((alive _nearVehicle) && _isInCombat == 0) then {
|
||||
if ((alive _nearVehicle) and _isInCombat == 0) then {
|
||||
_nearVehicle setVariable["startcombattimer", 1];
|
||||
//diag_log("Now in Combat (Player): " + name _unit);
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
};
|
||||
};
|
||||
|
||||
if (_nearVehicle isKindOf "AllVehicles") then {
|
||||
{
|
||||
_isInCombat = _x getVariable["startcombattimer",0];
|
||||
if (isPlayer _x && _isInCombat == 0 && alive _x) then {
|
||||
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
|
||||
_x setVariable["startcombattimer", 1];
|
||||
//diag_log("Now in Combat (Crew): " + name _x);
|
||||
diag_log("Now in Combat (Crew): " + name _x);
|
||||
};
|
||||
} forEach (crew _nearVehicle);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user