Don't check intersection if distance < 1m

Related to #869
This commit is contained in:
PabstMirror 2015-04-29 02:34:47 -05:00
parent f83f8dad0e
commit 47d4446520

View File

@ -50,11 +50,12 @@ if (GVAR(openedMenuType) == 0 && vehicle ACE_player == ACE_player &&
if (_actualDistance > _distance) exitWith {true};
if (_distance > 1.0) exitWith {
if (_actualDistance > 1.0) exitWith {
// If distance to action is greater than 1.0 m, check LOS
_line = [_headPos call EFUNC(common,positionToASL), _pos call EFUNC(common,positionToASL), _object, ACE_player];
lineIntersects _line
};
false
}) exitWith {false};
// Exit if the action is behind you