mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
player has to put weapon on back before climbing, check if still can climb
This commit is contained in:
parent
fd821de353
commit
4264f78128
@ -24,6 +24,15 @@ if !([_unit] call FUNC(canClimb)) exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if !(_unit getVariable [QGVAR(isClimbInit), false]) then {
|
if !(_unit getVariable [QGVAR(isClimbInit), false]) then {
|
||||||
|
_unit addEventHandler ["AnimChanged", {
|
||||||
|
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {
|
||||||
|
// abort climb animation
|
||||||
|
if !(_this call FUNC(canClimb)) then {
|
||||||
|
[_this select 0, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
|
||||||
_unit addEventHandler ["AnimDone", {
|
_unit addEventHandler ["AnimDone", {
|
||||||
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {_this call FUNC(handleClimb)};
|
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {_this call FUNC(handleClimb)};
|
||||||
}];
|
}];
|
||||||
@ -32,5 +41,5 @@ if !(_unit getVariable [QGVAR(isClimbInit), false]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||||
[_unit, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
[_unit, "AmovPercMstpSnonWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||||
[_unit, "ACE_Climb", 0] call EFUNC(common,doAnimation);
|
[_unit, "ACE_Climb", 0] call EFUNC(common,doAnimation);
|
||||||
|
Loading…
Reference in New Issue
Block a user