mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - isBeingCarried
This commit is contained in:
parent
254a25b139
commit
604e851423
@ -56,11 +56,12 @@ if (_target isKindOf "CAManBase") then {
|
|||||||
|
|
||||||
[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus);
|
[_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
|
// prevents draging and carrying at the same time
|
||||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ PREP(hasItems);
|
|||||||
PREP(hasMedicalEnabled);
|
PREP(hasMedicalEnabled);
|
||||||
PREP(hasTourniquetAppliedTo);
|
PREP(hasTourniquetAppliedTo);
|
||||||
PREP(init);
|
PREP(init);
|
||||||
|
PREP(isBeingCarried);
|
||||||
PREP(isBeingDragged);
|
PREP(isBeingDragged);
|
||||||
PREP(isInMedicalFacility);
|
PREP(isInMedicalFacility);
|
||||||
PREP(isMedic);
|
PREP(isMedic);
|
||||||
|
26
addons/medical/functions/fnc_isBeingCarried.sqf
Normal file
26
addons/medical/functions/fnc_isBeingCarried.sqf
Normal 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
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
* Returns if a target is being dragged.
|
* Returns if a target is being dragged. (from ace_dragging)
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Target Unit <OBJECT>
|
* 0: Target Unit <OBJECT>
|
||||||
|
Loading…
Reference in New Issue
Block a user