-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Minimum distance check for AAF Road Patrol #3031
Conversation
Better to add the inAreaArray as a one-liner to the select at around line 17 instead, as that's already condition-filtering. I feel like there was a reason why I didn't do that earlier but I was probably just being picky. Can rewrite it properly later anyway. |
From what i understand the code _bases is used for both as starting locations and locations that the patrol will visit, so putting the check up there at 17 would exclude outposts and locations that the player is at from being visited |
I've checked. Ideally the origin base check includes non-player spawners and doesn't include airborne units. Could probably be a bit larger too, although there's no path check so there's some risk of ending up on the wrong island. |
Changed to a one line filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would have split that into two ifs, but it'll do for now. Function needs a lot of work later anyway.
What type of PR is this.
What have you changed and why?
Information:
Filters out patrol starting locations that which have players within 350m
Please specify which Issue this PR Resolves.
Should close #2589
Please verify the following and ensure all checks are completed.
Is further testing or are further changes required?
How can the changes be tested?
Steps:
Run "[] spawn A3A_fnc_AAFroadPatrol" when close and further away from a valid location.
Changes:
the check for players distance may need to be increased as
250350 might be a little short.Notes:
The hard limit on tries is something i admit i feel dubious about, it is probably fine as is.Because of the exitWith if _startBases is empty it cannot go into a infinite loop, _limit only exists as a performance save.