Try to use cursorObject first

This commit is contained in:
PabstMirror 2016-04-14 10:57:36 -05:00
parent 3744b980f4
commit d523ef1fcd

View File

@ -98,11 +98,17 @@ if (_range > 50 && {_range < 2500}) then {
};
};
if (isNull _newTarget) then {
private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorTarget, ace_player, cursorTarget, true, 1];
if (_intersectionsToCursorTarget isEqualTo []) 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