mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added canDrag
This commit is contained in:
parent
7b519fc2e0
commit
0428a1d558
@ -22,6 +22,7 @@ PREP(addUnloadPatientActions);
|
||||
PREP(canAccessMedicalEquipment);
|
||||
PREP(canTreat);
|
||||
PREP(canTreatCached);
|
||||
PREP(canCarry);
|
||||
PREP(determineIfFatal);
|
||||
PREP(getBloodLoss);
|
||||
PREP(getBloodPressure);
|
||||
|
29
addons/medical/functions/fnc_canCarry.sqf
Normal file
29
addons/medical/functions/fnc_canCarry.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if caller can carry or drag the target
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The caller <OBJECT>
|
||||
* 1: The target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* NONE
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_caller", "_target", "_positionUnit", "_carry"];
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
if (!(_target isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{false};
|
||||
|
||||
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {false};
|
||||
|
||||
if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _target} || {(([_target] call EFUNC(common,isAwake)))}) exitwith {false};
|
||||
|
||||
if (!alive _target) exitwith {GVAR(allowDeadBodyMovement)};
|
||||
|
||||
((isNull ([_caller] call FUNC(getCarriedObj))) && {isNull ([_target] call FUNC(getCarriedObj))} && {isNull ([_caller] call FUNC(getCarriedBy))} && {isNull ([_target] call FUNC(getCarriedBy))})
|
Loading…
Reference in New Issue
Block a user