mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
- Moved player_countMagazines to \compile\ folder - Removed several unused and obsolete files - Moved some epoch functions out of compiles.sqf into individual files - Synced order and formatting with 1.8.7. Much easier to compare now. Any changes I make to official DayZ Mod code and files I also submit as a pull request to them.
18 lines
502 B
Plaintext
18 lines
502 B
Plaintext
private ["_notClosest","_playerDistance","_nearPlayers","_obj","_playerNear"];
|
|
|
|
if (!isNull _this) then {
|
|
_nearPlayers = _this nearEntities ["CAManBase", 12];
|
|
_playerNear = ({isPlayer _x} count _nearPlayers) > 1;
|
|
_notClosest = false;
|
|
if (_playerNear) then {
|
|
// check if another player is closer
|
|
_playerDistance = player distance _this;
|
|
{
|
|
if (_playerDistance > (_x distance _this)) exitWith { _notClosest = true; };
|
|
} count _nearPlayers;
|
|
};
|
|
} else {
|
|
_notClosest = false;
|
|
};
|
|
|
|
_notClosest |