From f0d255a6c750f9511c4d9e35f349af7ad2511d68 Mon Sep 17 00:00:00 2001 From: ikpil Date: Tue, 18 Apr 2023 00:25:52 +0900 Subject: [PATCH] change HashSet -> List --- src/DotRecast.Detour.Crowd/Crowd.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DotRecast.Detour.Crowd/Crowd.cs b/src/DotRecast.Detour.Crowd/Crowd.cs index 3bf7349..e4cdeb7 100644 --- a/src/DotRecast.Detour.Crowd/Crowd.cs +++ b/src/DotRecast.Detour.Crowd/Crowd.cs @@ -142,7 +142,7 @@ namespace DotRecast.Detour.Crowd public const int DT_CROWD_MAX_QUERY_FILTER_TYPE = 16; private readonly AtomicInteger agentId = new AtomicInteger(); - private readonly HashSet m_agents; + private readonly List m_agents; private readonly PathQueue m_pathq; private readonly ObstacleAvoidanceQuery.ObstacleAvoidanceParams[] m_obstacleQueryParams = new ObstacleAvoidanceQuery.ObstacleAvoidanceParams[DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS]; private readonly ObstacleAvoidanceQuery m_obstacleQuery; @@ -180,7 +180,7 @@ namespace DotRecast.Detour.Crowd // Allocate temp buffer for merging paths. m_pathq = new PathQueue(config); - m_agents = new HashSet(); + m_agents = new List(); // The navQuery is mostly used for local searches, no need for large node pool. navMesh = nav; @@ -353,9 +353,9 @@ namespace DotRecast.Detour.Crowd * * @return List of active agents */ - public List getActiveAgents() + public ICollection getActiveAgents() { - return new List(m_agents); + return m_agents; } public Vector3f getQueryExtents()