Skip to content

Commit dba670d

Browse files
committed
More rappelling improvements
- Improving timing of AI rappelling - Allowing damage when rappelling if heli engine is off
1 parent 43dc739 commit dba670d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

addons/AR_AdvancedRappelling/functions/fn_advancedRappellingInit.sqf

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,13 @@ AR_Client_Rappel_From_Heli = {
402402
};
403403
}];
404404
} else {
405-
_randomSpeedFactor = ((random 10) - 5) / 10;
406-
ropeUnwind [ _rope1, 3 + _randomSpeedFactor, ropeLength _rope2];
407-
ropeUnwind [ _rope2, 3 + _randomSpeedFactor, ropeLength _rope1];
405+
[_rope1,_rope2] spawn {
406+
params ["_rope1","_rope2"];
407+
sleep 2;
408+
_randomSpeedFactor = ((random 10) - 5) / 10;
409+
ropeUnwind [ _rope1, 3 + _randomSpeedFactor, ropeLength _rope2];
410+
ropeUnwind [ _rope2, 3 + _randomSpeedFactor, ropeLength _rope1];
411+
};
408412
};
409413

410414
// Cause player to fall from rope if heli is moving too fast
@@ -493,6 +497,11 @@ AR_Client_Rappel_From_Heli = {
493497
};
494498
};
495499

500+
// Allow damage if you get out of a heli with no engine on
501+
if(!isEngineOn _heli) then {
502+
_player allowDamage true;
503+
};
504+
496505
};
497506

498507
_player switchMove "";
@@ -665,7 +674,7 @@ AR_Add_Player_Actions = {
665674
_player addAction ["Rappel AI Units", {
666675
{
667676
if(!isPlayer _x) then {
668-
sleep 0.2;
677+
sleep 1;
669678
[_x, vehicle _x] call AR_Rappel_From_Heli_Action;
670679
};
671680
} forEach (units player);

0 commit comments

Comments
 (0)