wip, fbcb2_assets, init, util
This commit is contained in:
12
framework/util/functions/fn_getNearestBase.sqf
Normal file
12
framework/util/functions/fn_getNearestBase.sqf
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
params [["_object", objNull, [objNull]]];
|
||||
if (isNull _object) exitWith {objNull};
|
||||
|
||||
private _bases = missionNamespace getVariable ["milsim_baseObjects", []];
|
||||
if (count _bases == 0) exitWith {objNull};
|
||||
|
||||
// get nearest base (Module_Respawn_F)
|
||||
private _closestBase = [_bases, _object] call BIS_fnc_nearestPosition;
|
||||
if (isNull _closestBase) exitWith {objNull};
|
||||
_closestBase;
|
||||
Reference in New Issue
Block a user