detach when entering a vehicle, don't mess up animation insidea vehicle

This commit is contained in:
commy2 2015-03-25 21:51:50 +01:00
parent 01b7d3b213
commit e007a247d8
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ if (isNil "ACE_maxWeightCarry") then {
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
["playerChanged", {_this call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["playerVehicleChanged", {[ACE_player, objNull] call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["playerWeaponChanged", {_this call DFUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler);
// handle waking up dragged unit and falling unconscious while dragging

View File

@ -32,7 +32,9 @@ detach _target;
// fix anim when aborting carrying persons
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
[_unit, "", 2, true] call EFUNC(common,doAnimation);
if (vehicle _unit == _unit) then {
[_unit, "", 2, true] call EFUNC(common,doAnimation);
};
if (_target getVariable ["ACE_isUnconscious", false]) then {
[_target, "unconscious", 2, true] call EFUNC(common,doAnimation);