Skip to content

Commit

Permalink
Merge pull request #3022 from acemod/bodybagevent
Browse files Browse the repository at this point in the history
add event for placing units in body bags
  • Loading branch information
commy2 committed Jan 5, 2016
2 parents 279b48f + 7f63d51 commit 7eaa55f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ _spinePos = _target modelToWorldVisual (_target selectionPosition "Spine3");
_dirVect = _headPos vectorFromTo _spinePos;
_direction = _dirVect call CBA_fnc_vectDir;

deleteVehicle _target;

_bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, "CAN_COLLIDE"];

["placedInBodyBag", [_target, _bodyBag]] call EFUNC(common,globalEvent);

deleteVehicle _target;

// prevent body bag from flipping
_bodyBag setPosASL _position;
_bodyBag setDir _direction;
Expand Down

0 comments on commit 7eaa55f

Please sign in to comment.