This repository has been archived by the owner on Jul 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
2,337 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* 0: center search pos | ||
* 1: search radius (number/array) | ||
* 2: search direction (number/array) | ||
* 3: water | ||
* 0: doesn't matter | ||
* 1: don't find water pos | ||
* 2: only find water pos | ||
*/ | ||
|
||
params ["_center","_radius",["_angle",[0,360]],["_water",0]]; | ||
|
||
if (typeName _radius == "ARRAY") then { | ||
_min = selectMin _radius; | ||
_max = selectMax _radius; | ||
_radius = (random (_max - _min)) + _min; | ||
}; | ||
|
||
if (typeName _angle == "ARRAY") then { | ||
_min = selectMin _angle; | ||
_max = selectMax _angle; | ||
_angle = (random (_max - _min)) + _min; | ||
}; | ||
|
||
_searchPos = _center getPos [_radius,_angle]; | ||
|
||
_pos = switch (_water) do { | ||
case (0): { | ||
_searchPos | ||
}; | ||
case (1): { | ||
_pos = _searchPos; | ||
for [{_i=0}, {_i<100}, {_i=_i+1}] do { | ||
if !(surfaceIsWater _pos) exitWith {}; | ||
_pos = _searchPos getPos [_i*10,random 360]; | ||
}; | ||
_pos | ||
}; | ||
case (2): { | ||
_pos = _searchPos; | ||
for [{_i=0}, {_i<100}, {_i=_i+1}] do { | ||
if (surfaceIsWater _pos) exitWith {}; | ||
_pos = _searchPos getPos [_i*10,random 360]; | ||
}; | ||
_pos | ||
}; | ||
}; | ||
|
||
_pos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
if (!hasInterface) exitWith {}; | ||
|
||
[{!isNil {(leader player) getVariable "swfreq"}}, { | ||
[{!isNull player && !isNil {(leader player) getVariable "swfreq"}}, { | ||
_freq = (leader player) getVariable "swfreq"; | ||
[(call TFAR_fnc_activeSwRadio), _freq] call TFAR_fnc_setSwFrequency; | ||
_settings = [0,7,[_freq,_freq,_freq,_freq,_freq,_freq,_freq,_freq],0,"_bluefor",-1,0,getplayerUID player,false]; | ||
[(call TFAR_fnc_activeSwRadio), _settings] call TFAR_fnc_setSwSettings; | ||
diag_log format ["SW frequency set to %1.", _freq]; | ||
}, []] call CBA_fnc_waitUntilAndExecute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.