mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
dbe372cb48
* Code cleanup * Moved keybinds to initKeybinds.sqf * Update addons/dragging/initKeybinds.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/dragging/functions/fnc_carryObject.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/dragging/functions/fnc_getWeight.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Rephrasing and adjustments for dragging --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
24 lines
568 B
Plaintext
24 lines
568 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Checks if unit can drop the dragged object.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit that is currently dragging an object <OBJECT>
|
|
* 1: Object being dragged <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can the unit drop the object? <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, cursorTarget] call ace_dragging_fnc_canDrop;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_target"];
|
|
|
|
if !([_unit, _target, ["isNotDragging", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
|
|
_unit getVariable [QGVAR(draggedObject), objNull] == _target
|