-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add Navigation Path filter with start position and radius for path searches #148
base: master
Are you sure you want to change the base?
Conversation
ebcd462
to
a206701
Compare
Squashed commits. |
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.
doesn't look like the filter's params are being populated.
PluginAPI.h
Outdated
@@ -49,6 +49,8 @@ struct NavigationOptions | |||
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 | |||
glm::vec3 searchstartpos; // the starting position of the search |
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.
searchStartPos
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.
or searchOrigin... (see below comment)
PluginAPI.h
Outdated
@@ -49,6 +49,8 @@ struct NavigationOptions | |||
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 |
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.
searchRadius
plugin/MQ2Navigation.cpp
Outdated
{ | ||
options.searchradius = GetIntFromString(value, 0); | ||
} | ||
else if (key == "searchstartpos") |
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.
Thinking that "searchorigin"
might be better.
plugin/NavigationPath.h
Outdated
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; } |
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.
inline isn't necessary to specify on implementations in the class definition
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.
these options aren't being set anywhere.
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.
f8a6fd0
to
c42f6e7
Compare
Added Nav Path Filter to verify path doesn't go outside boundary set by searchradius and searchstartpos.