Skip to content

Commit 22296fd

Browse files
committed
Additional pickup rope fix
1 parent 180aff0 commit 22296fd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

addons/SA_AdvancedSlingLoading/functions/fn_advancedSlingLoadingInit.sqf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ ASL_Hide_Object_Global = {
10081008
};
10091009

10101010
ASL_Find_Nearby_Vehicles = {
1011-
private ["_nearVehicles","_nearVehiclesWithRopes","_vehicle","_ends","_end1","_end2"];
1011+
private ["_nearVehicles","_nearVehiclesWithRopes","_vehicle","_ends","_end1","_end2","_playerPosAGL"];
10121012
_nearVehicles = [];
10131013
{
10141014
_nearVehicles append (player nearObjects [_x, 30]);
@@ -1025,7 +1025,8 @@ ASL_Find_Nearby_Vehicles = {
10251025
if(count _ends == 2) then {
10261026
_end1 = _ends select 0;
10271027
_end2 = _ends select 1;
1028-
if(((getPosASL player) distance _end1) < 5 || ((getPosASL player) distance _end2) < 5 ) then {
1028+
_playerPosAGL = ASLtoAGL getPosASL player;
1029+
if((_playerPosAGL distance _end1) < 5 || (_playerPosAGL distance _end2) < 5 ) then {
10291030
_nearVehiclesWithRopes = _nearVehiclesWithRopes + [_vehicle];
10301031
}
10311032
};

0 commit comments

Comments
 (0)