mirror of
https://github.com/sethduda/AdvancedRappelling.git
synced 2024-08-30 17:22:12 +00:00
More rappelling improvements
- Improving timing of AI rappelling - Allowing damage when rappelling if heli engine is off
This commit is contained in:
parent
43dc73963a
commit
dba670dff9
@ -402,10 +402,14 @@ AR_Client_Rappel_From_Heli = {
|
|||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
|
[_rope1,_rope2] spawn {
|
||||||
|
params ["_rope1","_rope2"];
|
||||||
|
sleep 2;
|
||||||
_randomSpeedFactor = ((random 10) - 5) / 10;
|
_randomSpeedFactor = ((random 10) - 5) / 10;
|
||||||
ropeUnwind [ _rope1, 3 + _randomSpeedFactor, ropeLength _rope2];
|
ropeUnwind [ _rope1, 3 + _randomSpeedFactor, ropeLength _rope2];
|
||||||
ropeUnwind [ _rope2, 3 + _randomSpeedFactor, ropeLength _rope1];
|
ropeUnwind [ _rope2, 3 + _randomSpeedFactor, ropeLength _rope1];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// Cause player to fall from rope if heli is moving too fast
|
// Cause player to fall from rope if heli is moving too fast
|
||||||
_this spawn {
|
_this spawn {
|
||||||
@ -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 "";
|
_player switchMove "";
|
||||||
@ -665,7 +674,7 @@ AR_Add_Player_Actions = {
|
|||||||
_player addAction ["Rappel AI Units", {
|
_player addAction ["Rappel AI Units", {
|
||||||
{
|
{
|
||||||
if(!isPlayer _x) then {
|
if(!isPlayer _x) then {
|
||||||
sleep 0.2;
|
sleep 1;
|
||||||
[_x, vehicle _x] call AR_Rappel_From_Heli_Action;
|
[_x, vehicle _x] call AR_Rappel_From_Heli_Action;
|
||||||
};
|
};
|
||||||
} forEach (units player);
|
} forEach (units player);
|
||||||
|
Loading…
Reference in New Issue
Block a user