Skip to content

Hunter: Use GetPointsInRadius() instead of square#1948

Draft
morganchristiansson wants to merge 3 commits into
Return-To-The-Roots:masterfrom
morganchristiansson:hunter-radius
Draft

Hunter: Use GetPointsInRadius() instead of square#1948
morganchristiansson wants to merge 3 commits into
Return-To-The-Roots:masterfrom
morganchristiansson:hunter-radius

Conversation

@morganchristiansson

Copy link
Copy Markdown

Hunter currently uses square, comments says it should be circle.
Update it to use new GetPointsInRadius() pattern from nofSkinner.cpp to find animals.
Also extract ANIMAL_RADIUS to shared constant used by Hunter, AI Hunter builder and Skinner.

This supports #1946 which displays building radius as outline.


void nofHunter::TryStartHunting()
{
// Find animals in a square around building (actually should be circle, but animals are moving anyway)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Literally says it should be a circle

Comment thread libs/s25main/ai/aijh/AIPlayerJH.cpp Outdated
Comment thread libs/s25main/gameData/GameConsts.h Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants