Medical - isBeingCarried

This commit is contained in:
PabstMirror 2015-04-03 14:37:04 -05:00
parent 254a25b139
commit 604e851423
4 changed files with 32 additions and 4 deletions

View File

@ -56,11 +56,12 @@ if (_target isKindOf "CAManBase") then {
[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus);
// prevent multiple players from accessing the same object
[_unit, _target, true] call EFUNC(common,claim);
};
// prevent multiple players from accessing the same object
[_unit, _target, true] call EFUNC(common,claim);
// prevents draging and carrying at the same time
_unit setVariable [QGVAR(isCarrying), true, true];

View File

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

View File

@ -0,0 +1,26 @@
/*
* Author: PabstMirror
* Returns if a target is being carried. (from ace_dragging)
*
* Arguments:
* 0: Target Unit <OBJECT>
*
* Return Value:
* Is being carried <BOOL>
*
* Example:
* [bob] call ace_medical_fnc_isBeingCarried
*
* 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,carriedObject), objNull]) == _target

View File

@ -1,6 +1,6 @@
/*
* Author: PabstMirror
* Returns if a target is being dragged.
* Returns if a target is being dragged. (from ace_dragging)
*
* Arguments:
* 0: Target Unit <OBJECT>