2015-07-03 21:14:23 +00:00
|
|
|
/*
|
|
|
|
* Author: KoffeinFlummi
|
|
|
|
* Checks if a unit is in a engineeral vehicle.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: unit to be checked <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Is unit in engineeral vehicle? <BOOL>
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-09 06:54:44 +00:00
|
|
|
params ["_unit"];
|
|
|
|
TRACE_1("params",_unit);
|
|
|
|
|
|
|
|
private ["_nearObjects", "_return"];
|
2015-07-03 21:14:23 +00:00
|
|
|
|
|
|
|
_nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20];
|
|
|
|
|
|
|
|
_return = false;
|
|
|
|
{
|
|
|
|
if ([_x] call FUNC(isRepairVehicle)) exitwith {_return = true;};
|
2015-08-09 06:54:44 +00:00
|
|
|
} forEach _nearObjects;
|
2015-07-03 21:14:23 +00:00
|
|
|
|
|
|
|
_return;
|