More rappelling improvements

- Improving timing of AI rappelling
- Allowing damage when rappelling if heli engine is off
This commit is contained in:
sethduda 2016-07-13 21:12:36 -04:00
parent 43dc73963a
commit dba670dff9

View File

@ -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);