diff --git a/src/DotRecast.Detour.Crowd/DtCrowd.cs b/src/DotRecast.Detour.Crowd/DtCrowd.cs index 713c1e0..1e48674 100644 --- a/src/DotRecast.Detour.Crowd/DtCrowd.cs +++ b/src/DotRecast.Detour.Crowd/DtCrowd.cs @@ -653,8 +653,7 @@ namespace DotRecast.Detour.Crowd while (!queue.IsEmpty()) { DtCrowdAgent ag = queue.Dequeue(); - ag.targetPathQueryResult = _pathQ.Request(ag.corridor.GetLastPoly(), ag.targetRef, ag.corridor.GetTarget(), - ag.targetPos, _filters[ag.option.queryFilterType]); + ag.targetPathQueryResult = _pathQ.Request(ag.corridor.GetLastPoly(), ag.targetRef, ag.corridor.GetTarget(), ag.targetPos, _filters[ag.option.queryFilterType]); if (ag.targetPathQueryResult != null) { ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH; @@ -1298,7 +1297,6 @@ namespace DotRecast.Detour.Crowd ag.partial = false; } } - } private void UpdateOffMeshConnections(IList agents, float dt) diff --git a/test/DotRecast.Detour.TileCache.Test/SampleAreaModifications.cs b/test/DotRecast.Detour.TileCache.Test/SampleAreaModifications.cs index b658035..ecdf2fe 100644 --- a/test/DotRecast.Detour.TileCache.Test/SampleAreaModifications.cs +++ b/test/DotRecast.Detour.TileCache.Test/SampleAreaModifications.cs @@ -24,41 +24,30 @@ namespace DotRecast.Detour.TileCache.Test; public class SampleAreaModifications { - public static int SAMPLE_POLYAREA_TYPE_MASK = 0x07; + public const int SAMPLE_POLYAREA_TYPE_MASK = 0x07; /// Value for the kind of ceil "ground" - public static int SAMPLE_POLYAREA_TYPE_GROUND = 0x1; + public const int SAMPLE_POLYAREA_TYPE_GROUND = 0x1; /// Value for the kind of ceil "water" - public static int SAMPLE_POLYAREA_TYPE_WATER = 0x2; + public const int SAMPLE_POLYAREA_TYPE_WATER = 0x2; /// Value for the kind of ceil "road" - public static int SAMPLE_POLYAREA_TYPE_ROAD = 0x3; + public const int SAMPLE_POLYAREA_TYPE_ROAD = 0x3; /// Value for the kind of ceil "grass" - public static int SAMPLE_POLYAREA_TYPE_GRASS = 0x4; + public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x4; /// Flag for door area. Can be combined with area types and jump flag. - public static int SAMPLE_POLYAREA_FLAG_DOOR = 0x08; + public const int SAMPLE_POLYAREA_FLAG_DOOR = 0x08; /// Flag for jump area. Can be combined with area types and door flag. - public static int SAMPLE_POLYAREA_FLAG_JUMP = 0x10; + public const int SAMPLE_POLYAREA_FLAG_JUMP = 0x10; - public static RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, - SAMPLE_POLYAREA_TYPE_MASK); - - public static RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, - SAMPLE_POLYAREA_TYPE_MASK); - - public static RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, - SAMPLE_POLYAREA_TYPE_MASK); - - public static RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, - SAMPLE_POLYAREA_TYPE_MASK); - - public static RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_FLAG_DOOR, - SAMPLE_POLYAREA_FLAG_DOOR); - - public static RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_FLAG_JUMP, - SAMPLE_POLYAREA_FLAG_JUMP); + public static readonly RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_FLAG_DOOR, SAMPLE_POLYAREA_FLAG_DOOR); + public static readonly RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_FLAG_JUMP, SAMPLE_POLYAREA_FLAG_JUMP); } \ No newline at end of file diff --git a/test/DotRecast.Detour.TileCache.Test/TempObstaclesTest.cs b/test/DotRecast.Detour.TileCache.Test/TempObstaclesTest.cs index a70a61d..18206d3 100644 --- a/test/DotRecast.Detour.TileCache.Test/TempObstaclesTest.cs +++ b/test/DotRecast.Detour.TileCache.Test/TempObstaclesTest.cs @@ -99,4 +99,4 @@ public class TempObstaclesTest : AbstractTileCacheTest Assert.That(tile.data.header.vertCount, Is.EqualTo(16)); Assert.That(tile.data.header.polyCount, Is.EqualTo(6)); } -} +} \ No newline at end of file diff --git a/test/DotRecast.Detour.TileCache.Test/TileCacheFindPathTest.cs b/test/DotRecast.Detour.TileCache.Test/TileCacheFindPathTest.cs index 2a18a61..2b60328 100644 --- a/test/DotRecast.Detour.TileCache.Test/TileCacheFindPathTest.cs +++ b/test/DotRecast.Detour.TileCache.Test/TileCacheFindPathTest.cs @@ -21,7 +21,6 @@ freely, subject to the following restrictions: using System.Collections.Generic; using System.IO; using DotRecast.Core; - using DotRecast.Detour.TileCache.Io; using NUnit.Framework; @@ -58,7 +57,7 @@ public class TileCacheFindPathTest : AbstractTileCacheTest int options = 0; var pathStr = new List(); - query.FindStraightPath(startPos, endPos, path, ref pathStr, maxStraightPath, options); + query.FindStraightPath(startPos, endPos, path, ref pathStr, maxStraightPath, options); Assert.That(pathStr.Count, Is.EqualTo(8)); } } \ No newline at end of file diff --git a/test/DotRecast.Detour.TileCache.Test/TileCacheNavigationTest.cs b/test/DotRecast.Detour.TileCache.Test/TileCacheNavigationTest.cs index fc09e62..f7eb38f 100644 --- a/test/DotRecast.Detour.TileCache.Test/TileCacheNavigationTest.cs +++ b/test/DotRecast.Detour.TileCache.Test/TileCacheNavigationTest.cs @@ -20,7 +20,6 @@ freely, subject to the following restrictions: using System.Collections.Generic; using DotRecast.Core; - using DotRecast.Recast; using DotRecast.Recast.Geom; using NUnit.Framework; diff --git a/test/DotRecast.Detour.TileCache.Test/TileCacheTest.cs b/test/DotRecast.Detour.TileCache.Test/TileCacheTest.cs index 0714646..c334e39 100644 --- a/test/DotRecast.Detour.TileCache.Test/TileCacheTest.cs +++ b/test/DotRecast.Detour.TileCache.Test/TileCacheTest.cs @@ -286,4 +286,4 @@ public class TileCacheTest : AbstractTileCacheTest Assert.That(data.detailVerts.Length, Is.EqualTo(0)); Assert.That(data.detailTris.Length, Is.EqualTo(4 * 3)); } -} +} \ No newline at end of file diff --git a/test/DotRecast.Recast.Test/SampleAreaModifications.cs b/test/DotRecast.Recast.Test/SampleAreaModifications.cs index 6794824..61c8ec3 100644 --- a/test/DotRecast.Recast.Test/SampleAreaModifications.cs +++ b/test/DotRecast.Recast.Test/SampleAreaModifications.cs @@ -40,21 +40,10 @@ public class SampleAreaModifications /// Flag for jump area. Can be combined with area types and door flag. public const int SAMPLE_POLYAREA_FLAG_JUMP = 0x10; - public static readonly RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, - SAMPLE_POLYAREA_TYPE_MASK); - - public static readonly RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, - SAMPLE_POLYAREA_TYPE_MASK); - - public static readonly RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, - SAMPLE_POLYAREA_TYPE_MASK); - - public static readonly RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, - SAMPLE_POLYAREA_TYPE_MASK); - - public static readonly RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_FLAG_DOOR, - SAMPLE_POLYAREA_FLAG_DOOR); - - public static readonly RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_FLAG_JUMP, - SAMPLE_POLYAREA_FLAG_JUMP); + public static readonly RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, SAMPLE_POLYAREA_TYPE_MASK); + public static readonly RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_FLAG_DOOR, SAMPLE_POLYAREA_FLAG_DOOR); + public static readonly RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_FLAG_JUMP, SAMPLE_POLYAREA_FLAG_JUMP); } \ No newline at end of file