Merge pull request #3682 from acemod/javelinCursorTargetFix

Javelin - Verify player has LOS to cursorTarget
This commit is contained in:
PabstMirror 2016-04-21 19:50:23 -05:00
commit 71ff7e9d8a

View File

@ -98,8 +98,17 @@ if (_range > 50 && {_range < 2500}) then {
};
};
if (isNull _newTarget) then {
_newTarget = cursorTarget;
if ((isNull _newTarget) && {cursorObject isKindOf "AllVehicles"}) then {
private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorObject, ace_player, cursorObject, true, 1];
if (_intersectionsToCursorTarget isEqualTo []) then {
_newTarget = cursorObject;
};
};
if ((isNull _newTarget) && {cursorTarget isKindOf "AllVehicles"}) then {
private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorTarget, ace_player, cursorTarget, true, 1];
if (_intersectionsToCursorTarget isEqualTo []) then {
_newTarget = cursorTarget;
};
};
// Create constants