Add Navigation Path filter with start position and radius for path searches#148
Open
suedeworthey wants to merge 3 commits intobrainiac:masterfrom
Open
Add Navigation Path filter with start position and radius for path searches#148suedeworthey wants to merge 3 commits intobrainiac:masterfrom
suedeworthey wants to merge 3 commits intobrainiac:masterfrom
Conversation
ebcd462 to
a206701
Compare
Author
|
Squashed commits. |
brainiac
requested changes
May 30, 2024
Owner
brainiac
left a comment
There was a problem hiding this comment.
doesn't look like the filter's params are being populated.
PluginAPI.h
Outdated
| bool track = true; // if spawn is to be tracked | ||
| FacingType facing = FacingType::Forward; // Forward = normal, Backward = move along path facing backward. | ||
| int searchradius = 0; // the max search radius of the path | ||
| glm::vec3 searchstartpos; // the starting position of the search |
Owner
There was a problem hiding this comment.
or searchOrigin... (see below comment)
PluginAPI.h
Outdated
| bool paused = false; // pathing is paused | ||
| bool track = true; // if spawn is to be tracked | ||
| FacingType facing = FacingType::Forward; // Forward = normal, Backward = move along path facing backward. | ||
| int searchradius = 0; // the max search radius of the path |
plugin/MQ2Navigation.cpp
Outdated
| { | ||
| options.searchradius = GetIntFromString(value, 0); | ||
| } | ||
| else if (key == "searchstartpos") |
Owner
There was a problem hiding this comment.
Thinking that "searchorigin" might be better.
plugin/NavigationPath.h
Outdated
Comment on lines
67
to
72
| inline NavPathFilter() { }; | ||
| inline virtual ~NavPathFilter() override { }; | ||
| virtual bool passFilter(const dtPolyRef ref, const dtMeshTile* tile, const dtPoly* poly) const override; | ||
| inline void SetSearchRadius(int radius) { m_searchRadius = radius; } | ||
| inline int GetSearchRadius() const { return m_searchRadius; } | ||
| inline void SetStartPos(const glm::vec3& pos) { m_startPos = pos; } |
Owner
There was a problem hiding this comment.
inline isn't necessary to specify on implementations in the class definition
Owner
There was a problem hiding this comment.
these options aren't being set anywhere.
f8a6fd0 to
c42f6e7
Compare
c42f6e7 to
a3fbec0
Compare
Updated Nav path filter to check if path would go outside boundary set by camp radius to improve pulling. Added start position for nav filter to ensure it doesn't follow the player.
a3fbec0 to
3b91136
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Nav Path Filter to verify path doesn't go outside boundary set by searchradius and searchstartpos.