-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix AI air squad misbehaving in TS maps #18710
Conversation
The real problem here is that the squad code is mixing up Replacing var pos = new CPos((i % columnCount) * dangerRadius + dangerRadius / 2, (i / columnCount) * dangerRadius + dangerRadius / 2); with var pos = new MPos((i % columnCount) * dangerRadius + dangerRadius / 2, (i / columnCount) * dangerRadius + dangerRadius / 2).ToCPos(map); may be a much simpler workaround for the issue. |
This is a natural part two to #17855, so really should be on the milestone. |
Don't know if that is working. But I will have a try. |
@pchote |
Change Cpos to Mpos by Pchote
a415db8
to
4018a06
Compare
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.
Not tested, but the code change looks correct.
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.
The AI still behaves weird with air units, but this change is not making it worse (and makes sense).
So AI air squad still won't attack when enemy actors at certain side of map? during my test it seems OK, although the target they pick become weird. |
They still sometimes start to idle, or don't reload. See #6316. |
In fact, when bot's base under attack the aircraft is controlled by protection squad, which overtake controls from air squad. You can use #17999 to fix. (#18039 also help a little bit on reload part for aircraft in protection squad) |
Fixes #18705
I divide two scanning method into two
if
. I think the array is unnecessary for RectangularIsometric maps and may save some performance before we come out with better idea.