Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum distance check for AAF Road Patrol #3031

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions A3A/addons/core/functions/CREATE/fn_AAFroadPatrol.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _roads = [];
private _players = allPlayers - entities "HeadlessClient_F";
private _bases = (seaports + airportsX + outposts) select {
call {
if (_players inAreaArray [markerPos _x, 2000, 2000] isEqualTo []) exitWith {false};
if ((_players inAreaArray [markerPos _x, 2000, 2000] isEqualTo []) && !(_players inAreaArray [markerPos _x, 350, 350] isEqualTo [])) exitWith {false};
private _side = sidesX getVariable [_x, sideUnknown];
if (_side == teamPlayer) exitWith {false};
if (_x in seaports and Faction(_side) get "vehiclesGunBoats" isEqualTo []) exitWith {false};
Expand All @@ -23,10 +23,10 @@ private _bases = (seaports + airportsX + outposts) select {
};
};
if (_bases isEqualTo []) exitWith {};

Debug_1("Possible patrol bases %1", _bases);

_base = selectRandom _bases;

_sideX = sidesX getVariable [_base,sideUnknown];
private _faction = Faction(_sideX);

Expand Down