Skip to content

Commit

Permalink
Update manage_one_patrol.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
Apricot-ale committed Jul 11, 2024
1 parent 25aafb4 commit 4fdf265
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Missionframework/scripts/server/patrols/manage_one_patrol.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ while { KPLIB_endgame == 0 } do {

_grp = grpNull;

private _minSpawnRange = round (KPLIB_range_pointActivation * 0.5);
private _maxSpawnRange = round (KPLIB_range_pointActivation * 4);

_spawn_marker = "";
while { _spawn_marker == "" } do {
_spawn_marker = [(KPLIB_range_pointActivation*1),(KPLIB_range_pointActivation*4),true] call KPLIB_fnc_getOpforSpawnPoint;
_spawn_marker = [_minSpawnRange,_maxSpawnRange,true] call KPLIB_fnc_getOpforSpawnPoint;
if ( _spawn_marker == "" ) then {
sleep (150 + (random 150));
};
Expand All @@ -30,9 +33,12 @@ while { KPLIB_endgame == 0 } do {

if (_is_infantry) then {

private _minRange = round (KPLIB_range_pointActivation * 0.75);
private _maxRange = round (KPLIB_range_pointActivation * 3);

private _sectors_spawn = [];
{
if ((_sector_spawn_pos distance (markerpos _x) > round (KPLIB_range_pointActivation / 0.5)) && (_sector_spawn_pos distance (markerpos _x) < round (KPLIB_range_pointActivation * 3))) then {
if ((_sector_spawn_pos distance (markerpos _x) > _minRange) && (_sector_spawn_pos distance (markerpos _x) < _maxRange)) then {
_sectors_spawn pushBack _x;
};
} foreach (KPLIB_sectors_all - (KPLIB_sectors_player + KPLIB_sectors_active));
Expand Down

0 comments on commit 4fdf265

Please sign in to comment.