Medical - isBeingDragged func

This commit is contained in:
PabstMirror 2015-04-03 13:16:48 -05:00
parent d1d6252299
commit 254a25b139
2 changed files with 27 additions and 0 deletions

View File

@ -49,6 +49,7 @@ PREP(hasItems);
PREP(hasMedicalEnabled);
PREP(hasTourniquetAppliedTo);
PREP(init);
PREP(isBeingDragged);
PREP(isInMedicalFacility);
PREP(isMedic);
PREP(isMedicalVehicle);

View File

@ -0,0 +1,26 @@
/*
* Author: PabstMirror
* Returns if a target is being dragged.
*
* Arguments:
* 0: Target Unit <OBJECT>
*
* Return Value:
* Is being dragged <BOOL>
*
* Example:
* [bob] call ace_medical_fnc_isBeingDragged
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_1(_target);
private "_owner";
_owner = _target getVariable [QEGVAR(common,owner), objNull];
if (isNull _owner) exitWith {false};
(_owner getVariable [QEGVAR(dragging,draggedObject), objNull]) == _target