From dba670dff92f63c970d7b86da020865d7ee17a12 Mon Sep 17 00:00:00 2001 From: sethduda Date: Wed, 13 Jul 2016 21:12:36 -0400 Subject: [PATCH] More rappelling improvements - Improving timing of AI rappelling - Allowing damage when rappelling if heli engine is off --- .../functions/fn_advancedRappellingInit.sqf | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/addons/AR_AdvancedRappelling/functions/fn_advancedRappellingInit.sqf b/addons/AR_AdvancedRappelling/functions/fn_advancedRappellingInit.sqf index d191e3b..13bf88d 100644 --- a/addons/AR_AdvancedRappelling/functions/fn_advancedRappellingInit.sqf +++ b/addons/AR_AdvancedRappelling/functions/fn_advancedRappellingInit.sqf @@ -402,9 +402,13 @@ AR_Client_Rappel_From_Heli = { }; }]; } else { - _randomSpeedFactor = ((random 10) - 5) / 10; - ropeUnwind [ _rope1, 3 + _randomSpeedFactor, ropeLength _rope2]; - ropeUnwind [ _rope2, 3 + _randomSpeedFactor, ropeLength _rope1]; + [_rope1,_rope2] spawn { + params ["_rope1","_rope2"]; + sleep 2; + _randomSpeedFactor = ((random 10) - 5) / 10; + ropeUnwind [ _rope1, 3 + _randomSpeedFactor, ropeLength _rope2]; + ropeUnwind [ _rope2, 3 + _randomSpeedFactor, ropeLength _rope1]; + }; }; // Cause player to fall from rope if heli is moving too fast @@ -493,6 +497,11 @@ AR_Client_Rappel_From_Heli = { }; }; + // Allow damage if you get out of a heli with no engine on + if(!isEngineOn _heli) then { + _player allowDamage true; + }; + }; _player switchMove ""; @@ -665,7 +674,7 @@ AR_Add_Player_Actions = { _player addAction ["Rappel AI Units", { { if(!isPlayer _x) then { - sleep 0.2; + sleep 1; [_x, vehicle _x] call AR_Rappel_From_Heli_Action; }; } forEach (units player);