-
Notifications
You must be signed in to change notification settings - Fork 64
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
5 changed files
with
23 additions
and
17 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
4 changes: 2 additions & 2 deletions
4
core.liberation/scripts/shared/functions/F_getNearestSector.sqf
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,8 +1,8 @@ | ||
params ["_radius", ["_postosearch", getPosATL player], ["_sector_list", sectors_allSectors]]; | ||
|
||
private _sector_to_return = ""; | ||
private _close_sectors = _sector_list select { (markerPos _x) distance _postosearch < _radius }; | ||
private _close_sectors_sorted = [_close_sectors, [_postosearch] , { (markerPos _x) distance _input0 }, 'ASCEND'] call BIS_fnc_sortBy; | ||
private _close_sectors = _sector_list select { (markerPos _x) distance2D _postosearch < _radius }; | ||
private _close_sectors_sorted = [_close_sectors, [_postosearch] , { (markerPos _x) distance2D _input0 }, 'ASCEND'] call BIS_fnc_sortBy; | ||
if (count _close_sectors_sorted > 0) then { _sector_to_return = _close_sectors_sorted select 0; }; | ||
|
||
_sector_to_return; |