mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ab769757d9
Stuff Normalize Depends - Skip Glass Repair Fix spawned wheel/track not having correct damage getHitpointString robustness, hatchback fuelHitpoint, fix count errors - Formatting local -> private Fix Stuff
31 lines
566 B
Plaintext
31 lines
566 B
Plaintext
/*
|
|
* Author: KoffeinFlummi
|
|
* Checks if a unit is near an engineering vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Is near engineering vehicle <BOOL>
|
|
*
|
|
* Example:
|
|
* [unit] call ace_repair_fnc_isNearRepairVehicle
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
TRACE_1("params",_unit);
|
|
|
|
private ["_nearObjects", "_return"];
|
|
|
|
_nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20];
|
|
|
|
_return = false;
|
|
{
|
|
if ([_x] call FUNC(isRepairVehicle)) exitWith {_return = true;};
|
|
} forEach _nearObjects;
|
|
|
|
_return;
|