Skip to content

Commit

Permalink
More rappelling improvements
Browse files Browse the repository at this point in the history
- Improving timing of AI rappelling
- Allowing damage when rappelling if heli engine is off
  • Loading branch information
sethduda committed Jul 14, 2016
1 parent 43dc739 commit dba670d
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 "";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit dba670d

Please sign in to comment.