-
Notifications
You must be signed in to change notification settings - Fork 150
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
ignore locked statics in taskDefend #1016
Conversation
@@ -58,7 +58,7 @@ private _statics = _position nearObjects ["StaticWeapon", _radius]; | |||
private _buildings = _position nearObjects ["Building", _radius]; | |||
|
|||
// Filter out occupied statics | |||
_statics = _statics select {(_x emptyPositions "Gunner") > 0}; | |||
_statics = _statics select {locked _x != 2 && {(_x emptyPositions "Gunner") > 0}}; |
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.
0 - Unlocked; 1 - Default; 2 - Locked; 3 - Locked for player; -1 - vehicle is null.
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.
You want to also check for -1?
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.
No, but this is really messy.
Fixed the first one but moduleDefend uses CBA_fnc_taskDefend which is fixed in first commit |
On that note it might also be worth check for |
Don't think that amount of micromanaging is necessary. It is possible for another AI or player to enter the vehicle before the assigned AI can reach for example, and that would still be not covered by that check. |
@Cuel ready to merge? |
Yep sure. |
When merged this pull request will:
fix #1013