From 0f2b03a8c0cc30e143bde1697789c753df2b3e38 Mon Sep 17 00:00:00 2001 From: JimmyJames707 Date: Fri, 11 Apr 2014 16:50:57 +1000 Subject: [PATCH] I would like to submit a query filter for each agent type: https://groups.google.com/forum/#!searchin/recastnavigation/dtQueryFilter|sort:relevance|spell:false/recastnavigation/t-rFg2Ku9IY/PJNNkCjARccJ Search on queryFilterType and m_filters to see the changes. Also in this code there are bugfixes, that have already been submitted as issues. They can be ignored. Possible bug with requestMoveVelocity and navmesh regeneration https://groups.google.com/forum/#!topic/recastnavigation/E6khmmKJkzk Bug fix for No guard on dtCrowd::getAgent? https://groups.google.com/forum/#!topic/recastnavigation/yJ1EEVbOaKg --- DetourCrowd/Include/DetourCrowd.h | 29 ++++++++++++--- DetourCrowd/Source/DetourCrowd.cpp | 57 ++++++++++++++++++++---------- 2 files changed, 63 insertions(+), 23 deletions(-) diff --git a/DetourCrowd/Include/DetourCrowd.h b/DetourCrowd/Include/DetourCrowd.h index 243ac5a..c8cc392 100644 --- a/DetourCrowd/Include/DetourCrowd.h +++ b/DetourCrowd/Include/DetourCrowd.h @@ -87,6 +87,9 @@ struct dtCrowdAgentParams /// [Limits: 0 <= value <= #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS] unsigned char obstacleAvoidanceType; + // [F] + unsigned char queryFilterType; + /// User defined data attached to the agent. void* userData; }; @@ -102,6 +105,9 @@ enum MoveRequestState DT_CROWDAGENT_TARGET_VELOCITY, }; +// [F] +static const int DT_CROWD_MAX_QUERY_FILTER_TYPE = 16; + /// Represents an agent managed by a #dtCrowd object. /// @ingroup crowd struct dtCrowdAgent @@ -157,6 +163,9 @@ struct dtCrowdAgent dtPathQueueRef targetPathqRef; ///< Path finder ref. bool targetReplan; ///< Flag indicating that the current path is being replanned. float targetReplanTime; ///