mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
logic
This commit is contained in:
parent
e1b5b96a7e
commit
0c8e8236dd
@ -7,6 +7,11 @@ _unit = _this select 0 select 0;
|
||||
_target = _this select 0 select 1;
|
||||
_timeOut = _this select 0 select 2;
|
||||
|
||||
// handle aborting carry
|
||||
if (_unit getVariable [QGVAR(isCarrying), false]) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// same as dragObjectPFH, checks if object is deleted or dead.
|
||||
if !([_target] call EFUNC(common,isAlive)) then {
|
||||
[_unit, _target] call FUNC(dropObject);
|
||||
@ -15,10 +20,7 @@ if !([_target] call EFUNC(common,isAlive)) then {
|
||||
|
||||
// timeout. Done with lifting object. Start carrying process.
|
||||
if (time > _timeOut) exitWith {
|
||||
// handles aborting carry
|
||||
if (_unit getVariable [QGVAR(isCarrying), false]) then {
|
||||
[_unit, _target] call FUNC(carryObject);
|
||||
};
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -7,6 +7,11 @@ _unit = _this select 0 select 0;
|
||||
_target = _this select 0 select 1;
|
||||
_timeOut = _this select 0 select 2;
|
||||
|
||||
// handle aborting drag
|
||||
if (_unit getVariable [QGVAR(isDragging), false]) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// same as dragObjectPFH, checks if object is deleted or dead.
|
||||
if !([_target] call EFUNC(common,isAlive)) then {
|
||||
[_unit, _target] call FUNC(dropObject);
|
||||
@ -26,10 +31,7 @@ if (time > _timeOut) exitWith {
|
||||
|
||||
// unit is ready to start dragging
|
||||
if (animationState _unit in DRAG_ANIMATIONS) exitWith {
|
||||
// handles aborting dragging
|
||||
if (_unit getVariable [QGVAR(isDragging), false]) then {
|
||||
[_unit, _target] call FUNC(dragObject);
|
||||
};
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user