Show tags for units inside the player vehicle. Close #538.

This commit is contained in:
esteldunedain 2016-02-08 22:54:24 -03:00
parent 4c938a050b
commit d4eda6d4ec

View File

@ -106,11 +106,14 @@ if (_enabledTagsNearby) then {
// Find valid targets and cache them
private _targets = [[], {
private _nearMen = _camPosAGL nearObjects ["CAManBase", _maxDistance + 7];
if (vehicle ACE_player != ACE_player) then {
_nearMen = _nearMen + crew vehicle ACE_player;
};
_nearMen select {
_x != ACE_player &&
{(side group _x) == (side group ACE_player)} &&
{GVAR(showNamesForAI) || {[_x] call EFUNC(common,isPlayer)}} &&
{lineIntersectsSurfaces [_camPosASL, eyePos _x, ACE_player, _x] isEqualTo []} &&
{lineIntersectsSurfaces [_camPosASL, eyePos _x, ACE_player, vehicle _x] isEqualTo []} &&
{!isObjectHidden _x}
}
}, missionNamespace, QGVAR(nearMen), 0.5] call EFUNC(common,cachedCall);