properly remove fake weapon, fix grabDrag action with fake weapon

This commit is contained in:
commy2 2015-03-18 16:55:57 +01:00
parent 330fc5658f
commit 1071284010
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,8 @@ _unit playAction "released";
// release object
detach _target;
_unit removeWeapon "ACE_FakePrimaryWeapon";
// prevent object from flipping inside buildings
if (_inBuilding) then {
_target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]);

View File

@ -37,6 +37,7 @@ _unit selectWeapon primaryWeapon _unit;
// prevent multiple players from accessing the same object
[_unit, _target, true] call EFUNC(common,claim);
_unit playActionNow "grabDrag";
// can't play action that depends on weapon if it was added the same frame
[{_this playActionNow "grabDrag";}, _unit] call EFUNC(common,execNextFrame);
[FUNC(startDragPFH), 0.2, [_unit, _target, time + 5]] call CBA_fnc_addPerFrameHandler;