2015-03-17 14:42:25 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
* Check if unit can drop the carried object.
|
|
|
|
*
|
2015-08-09 12:53:13 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Unit that currently carries a object <OBJECT>
|
|
|
|
* 1: Object that is carried <OBJECT>
|
2015-03-17 14:42:25 +00:00
|
|
|
*
|
2015-08-09 12:53:13 +00:00
|
|
|
* Return Value:
|
|
|
|
* Can the unit drop the object? <BOOL>
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-03-17 14:42:25 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-09 12:53:13 +00:00
|
|
|
params ["_unit", "_target"];
|
2015-03-17 14:42:25 +00:00
|
|
|
|
|
|
|
if !([_unit, _target, ["isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
|
|
|
|
|
|
_unit getVariable [QGVAR(carriedObject), objNull] == _target
|