Dragging - Fix dragging ai turrets via keybind (#10267)

This commit is contained in:
PabstMirror 2024-08-26 23:36:29 -05:00 committed by GitHub
parent 3b10396d3b
commit c5fb3d4cb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@
}; };
private _cursorObject = cursorObject; private _cursorObject = cursorObject;
if (_cursorObject isKindOf "CaManBase" && {unitIsUAV _cursorObject}) then { _cursorObject = vehicle _cursorObject };
if (isNull _cursorObject || {(_cursorObject distance _player) > 2.6}) exitWith {false}; if (isNull _cursorObject || {(_cursorObject distance _player) > 2.6}) exitWith {false};
if !([_player, _cursorObject] call FUNC(canDrag)) exitWith {false}; if !([_player, _cursorObject] call FUNC(canDrag)) exitWith {false};
@ -48,6 +49,7 @@
}; };
private _cursorObject = cursorObject; private _cursorObject = cursorObject;
if (_cursorObject isKindOf "CaManBase" && {unitIsUAV _cursorObject}) then { _cursorObject = vehicle _cursorObject };
if (isNull _cursorObject || {(_cursorObject distance _player) > 2.6}) exitWith {false}; if (isNull _cursorObject || {(_cursorObject distance _player) > 2.6}) exitWith {false};
if !([_player, _cursorObject] call FUNC(canCarry)) exitWith {false}; if !([_player, _cursorObject] call FUNC(canCarry)) exitWith {false};