From a13e8f37dea03ccfefe36cd0eb9d92933cd3dd14 Mon Sep 17 00:00:00 2001 From: sethduda Date: Fri, 8 Jul 2016 15:44:36 -0400 Subject: [PATCH] Adjusting sling load point intersection test to not clip ground Fixes #7 --- .../functions/fn_advancedSlingLoadingInit.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/SA_AdvancedSlingLoading/functions/fn_advancedSlingLoadingInit.sqf b/addons/SA_AdvancedSlingLoading/functions/fn_advancedSlingLoadingInit.sqf index bceaca9..bd8bd03 100644 --- a/addons/SA_AdvancedSlingLoading/functions/fn_advancedSlingLoadingInit.sqf +++ b/addons/SA_AdvancedSlingLoading/functions/fn_advancedSlingLoadingInit.sqf @@ -73,7 +73,7 @@ ASL_Get_Sling_Load_Points = { if(_la select 2 < 0 && _lb select 2 > 0) then { _n = [0,0,1]; - _p0 = [0,0,0]; + _p0 = [0,0,0.1]; _l = (_la vectorFromTo _lb); if((_l vectorDotProduct _n) != 0) then { _d = ( ( _p0 vectorAdd ( _la vectorMultiply -1 ) ) vectorDotProduct _n ) / (_l vectorDotProduct _n); @@ -1166,4 +1166,4 @@ diag_log "Advanced Sling Loading Loaded"; if(isServer) then { [] call ASL_Advanced_Sling_Loading_Install; -}; \ No newline at end of file +};