2015-08-25 17:29:45 +00:00
|
|
|
DMS_findSafePos = {
|
|
|
|
if(isServer) then {
|
|
|
|
private ["_pos","_centerPos","_fetchPos"];
|
2015-08-25 15:55:45 +00:00
|
|
|
|
2015-08-25 17:29:45 +00:00
|
|
|
//_centerPos = [getMarkerPos "center",4000,20000,10,0,25,0];
|
|
|
|
_centerPos = [getMarkerPos "center",2000,4000,10,0,25,0];
|
|
|
|
|
|
|
|
_fetchPos = false;
|
|
|
|
|
|
|
|
_int = 1;
|
|
|
|
|
|
|
|
|
|
|
|
while {!_fetchPos} do {
|
|
|
|
|
|
|
|
sleep 2;
|
|
|
|
|
|
|
|
_pos = _centerPos call BIS_fnc_findSafePos;
|
|
|
|
_int = _int + 1;
|
|
|
|
_fetchPos = true;
|
|
|
|
|
|
|
|
if (_fetchPos) then {
|
|
|
|
diag_log format ["DMS :: Found valid position at: (%1) in (%2) tries!",_pos,_int];
|
|
|
|
};
|
2015-08-25 15:55:45 +00:00
|
|
|
|
2015-08-25 17:29:45 +00:00
|
|
|
// more if exceptions to come
|
|
|
|
|
|
|
|
// water if exception to be added above
|
|
|
|
|
|
|
|
};
|
2015-08-25 15:55:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|