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

Unhardcode some AI squad scan radii and misc AI improvements #14466

Merged
merged 4 commits into from Dec 28, 2017

Conversation

reaperrr
Copy link
Contributor

@reaperrr reaperrr commented Dec 2, 2017

Increased configurability, improved disabled-trait-awareness and minor (though likely negligible) performance optimization.

Note: Intentionally didn't touch AirStates here, I'll wait for #14387 to be merged first.

// If there are any own buildings within the DangerRadius, don't flee
// PERF: Avoid LINQ
foreach (var u in units)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces around single line statements.

@GraionDilach
Copy link
Contributor

This looks like the solution of the issues I have with the AI since the isometric-range-rescale PR, so yes, pretty please fix the code issue.

@reaperrr
Copy link
Contributor Author

Updated.

Copy link
Contributor

@GraionDilach GraionDilach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 then.


for (var i = 0; i < x; i += DangerRadius * 2)
for (var i = 0; i < x; i += dangerRadius * 2)
Copy link
Member

@pchote pchote Dec 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually chunking the map like this is really awful 😢

In the future we could win a lot of simplicity and perf by maintaining spatially partitioned maps of targetability and danger for each squad class.

@pchote pchote merged commit 382c0b5 into OpenRA:bleed Dec 28, 2017
@reaperrr reaperrr deleted the misc-AI-improvements branch March 9, 2018 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants