mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Try to use cursorObject first
This commit is contained in:
parent
3744b980f4
commit
d523ef1fcd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user