diff --git a/src/DotRecast.Detour.Crowd/DtCrowd.cs b/src/DotRecast.Detour.Crowd/DtCrowd.cs index 764e8ff..e3165b5 100644 --- a/src/DotRecast.Detour.Crowd/DtCrowd.cs +++ b/src/DotRecast.Detour.Crowd/DtCrowd.cs @@ -268,14 +268,14 @@ namespace DotRecast.Detour.Crowd if (refs != 0) { - ag.state = CrowdAgentState.DT_CROWDAGENT_STATE_WALKING; + ag.state = DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING; } else { - ag.state = CrowdAgentState.DT_CROWDAGENT_STATE_INVALID; + ag.state = DtCrowdAgentState.DT_CROWDAGENT_STATE_INVALID; } - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_NONE; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE; return ag; } @@ -333,7 +333,7 @@ namespace DotRecast.Detour.Crowd agent.targetPos = vel; agent.targetPathQueryResult = null; agent.targetReplan = false; - agent.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY; + agent.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY; return true; } @@ -349,7 +349,7 @@ namespace DotRecast.Detour.Crowd agent.dvel = RcVec3f.Zero; agent.targetPathQueryResult = null; agent.targetReplan = false; - agent.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_NONE; + agent.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE; return true; } @@ -448,7 +448,7 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -474,7 +474,7 @@ namespace DotRecast.Detour.Crowd ag.corridor.Reset(0, agentPos); ag.partial = false; ag.boundary.Reset(); - ag.state = CrowdAgentState.DT_CROWDAGENT_STATE_INVALID; + ag.state = DtCrowdAgentState.DT_CROWDAGENT_STATE_INVALID; continue; } @@ -492,15 +492,15 @@ namespace DotRecast.Detour.Crowd // If the agent does not have move target or is controlled by // velocity, no need to recover the target nor replan. - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { continue; } // Try to recover move request position. - if (ag.targetState != MoveRequestState.DT_CROWDAGENT_TARGET_NONE - && ag.targetState != MoveRequestState.DT_CROWDAGENT_TARGET_FAILED) + if (ag.targetState != DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + && ag.targetState != DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED) { if (!_navQuery.IsValidPolyRef(ag.targetRef, _filters[ag.option.queryFilterType])) { @@ -515,7 +515,7 @@ namespace DotRecast.Detour.Crowd // Failed to reposition target, fail moverequest. ag.corridor.Reset(agentRef, agentPos); ag.partial = false; - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_NONE; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE; } } @@ -531,7 +531,7 @@ namespace DotRecast.Detour.Crowd // If the end of the path is near and it is not the requested // location, replan. - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VALID) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VALID) { if (ag.targetReplanTime > _config.targetReplanDelay && ag.corridor.GetPathCount() < _config.checkLookAhead && ag.corridor.GetLastPoly() != ag.targetRef) @@ -543,7 +543,7 @@ namespace DotRecast.Detour.Crowd // Try to replan path to goal. if (replan) { - if (ag.targetState != MoveRequestState.DT_CROWDAGENT_TARGET_NONE) + if (ag.targetState != DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE) { RequestMoveTargetReplan(ag, ag.targetRef, ag.targetPos); } @@ -561,18 +561,18 @@ namespace DotRecast.Detour.Crowd List reqPath = new List(); foreach (DtCrowdAgent ag in agents) { - if (ag.state == CrowdAgentState.DT_CROWDAGENT_STATE_INVALID) + if (ag.state == DtCrowdAgentState.DT_CROWDAGENT_STATE_INVALID) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING) { List path = ag.corridor.GetPath(); if (0 == path.Count) @@ -632,19 +632,19 @@ namespace DotRecast.Detour.Crowd if (reqPath[reqPath.Count - 1] == ag.targetRef) { - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_VALID; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_VALID; ag.targetReplanTime = 0; } else { // The path is longer or potentially unreachable, full plan. - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE; } ag.targetReplanWaitTime = 0; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) { queue.Enqueue(ag); } @@ -656,7 +656,7 @@ namespace DotRecast.Detour.Crowd 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; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH; } else { @@ -674,13 +674,13 @@ namespace DotRecast.Detour.Crowd // Process path results. foreach (DtCrowdAgent ag in agents) { - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) { // _telemetry.RecordPathWaitTime(ag.targetReplanTime); // Poll path queue. @@ -692,11 +692,11 @@ namespace DotRecast.Detour.Crowd ag.targetPathQueryResult = null; if (ag.targetRef != 0) { - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING; } else { - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_FAILED; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED; } ag.targetReplanTime = 0; @@ -788,12 +788,12 @@ namespace DotRecast.Detour.Crowd ag.corridor.SetCorridor(targetPos, res); // Force to update boundary. ag.boundary.Reset(); - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_VALID; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_VALID; } else { // Something went wrong. - ag.targetState = MoveRequestState.DT_CROWDAGENT_TARGET_FAILED; + ag.targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED; } ag.targetReplanTime = 0; @@ -813,13 +813,13 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { continue; } @@ -864,7 +864,7 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -926,13 +926,13 @@ namespace DotRecast.Detour.Crowd DtCrowdAgent debugAgent = debug != null ? debug.agent : null; foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { continue; } @@ -973,13 +973,13 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { continue; } @@ -1002,7 +1002,7 @@ namespace DotRecast.Detour.Crowd anim.t = 0.0f; anim.tmax = (RcVec3f.Dist2D(anim.startPos, anim.endPos) / ag.option.maxSpeed) * 0.5f; - ag.state = CrowdAgentState.DT_CROWDAGENT_STATE_OFFMESH; + ag.state = DtCrowdAgentState.DT_CROWDAGENT_STATE_OFFMESH; ag.corners.Clear(); ag.neis.Clear(); continue; @@ -1021,19 +1021,19 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE) { continue; } RcVec3f dvel = new RcVec3f(); - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { dvel = ag.targetPos; ag.desiredSpeed = ag.targetPos.Length(); @@ -1119,7 +1119,7 @@ namespace DotRecast.Detour.Crowd DtCrowdAgent debugAgent = debug != null ? debug.agent : null; foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -1188,7 +1188,7 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -1206,7 +1206,7 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { long idx0 = ag.idx; - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -1263,7 +1263,7 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -1279,7 +1279,7 @@ namespace DotRecast.Detour.Crowd foreach (DtCrowdAgent ag in agents) { - if (ag.state != CrowdAgentState.DT_CROWDAGENT_STATE_WALKING) + if (ag.state != DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING) { continue; } @@ -1290,8 +1290,8 @@ namespace DotRecast.Detour.Crowd ag.npos = ag.corridor.GetPos(); // If not using path, truncate the corridor to just one poly. - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) { ag.corridor.Reset(ag.corridor.GetFirstPoly(), ag.npos); ag.partial = false; @@ -1317,7 +1317,7 @@ namespace DotRecast.Detour.Crowd // Reset animation anim.active = false; // Prepare agent for walking. - ag.state = CrowdAgentState.DT_CROWDAGENT_STATE_WALKING; + ag.state = DtCrowdAgentState.DT_CROWDAGENT_STATE_WALKING; continue; } diff --git a/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs b/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs index f84ef83..67e8267 100644 --- a/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs +++ b/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs @@ -31,7 +31,7 @@ namespace DotRecast.Detour.Crowd public readonly long idx; /// The type of mesh polygon the agent is traversing. (See: #CrowdAgentState) - public CrowdAgentState state; + public DtCrowdAgentState state; /// True if the agent has valid path (targetState == DT_CROWDAGENT_TARGET_VALID) and the path does not lead to the /// requested position, else false. @@ -78,7 +78,7 @@ namespace DotRecast.Detour.Crowd /// The local path corridor corners for the agent. public List corners = new List(); - public MoveRequestState targetState; + public DtMoveRequestState targetState; /// < State of the movement request. public long targetRef; @@ -206,11 +206,11 @@ namespace DotRecast.Detour.Crowd targetPathQueryResult = null; if (targetRef != 0) { - targetState = MoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING; + targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING; } else { - targetState = MoveRequestState.DT_CROWDAGENT_TARGET_FAILED; + targetState = DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED; } } } diff --git a/src/DotRecast.Detour.Crowd/CrowdAgentState.cs b/src/DotRecast.Detour.Crowd/DtCrowdAgentState.cs similarity index 92% rename from src/DotRecast.Detour.Crowd/CrowdAgentState.cs rename to src/DotRecast.Detour.Crowd/DtCrowdAgentState.cs index 06c24f6..15b9dbc 100644 --- a/src/DotRecast.Detour.Crowd/CrowdAgentState.cs +++ b/src/DotRecast.Detour.Crowd/DtCrowdAgentState.cs @@ -2,7 +2,7 @@ { /// The type of navigation mesh polygon the agent is currently traversing. /// @ingroup crowd - public enum CrowdAgentState + public enum DtCrowdAgentState { DT_CROWDAGENT_STATE_INVALID, diff --git a/src/DotRecast.Detour.Crowd/DtCrowdTelemetry.cs b/src/DotRecast.Detour.Crowd/DtCrowdTelemetry.cs index 0b0c59d..a3da600 100644 --- a/src/DotRecast.Detour.Crowd/DtCrowdTelemetry.cs +++ b/src/DotRecast.Detour.Crowd/DtCrowdTelemetry.cs @@ -75,12 +75,12 @@ namespace DotRecast.Detour.Crowd return new RcAnonymousDisposable(() => Stop(label)); } - public void Start(DtCrowdTimerLabel name) + private void Start(DtCrowdTimerLabel name) { _executionTimings.Add(name, RcFrequency.Ticks); } - public void Stop(DtCrowdTimerLabel name) + private void Stop(DtCrowdTimerLabel name) { long duration = RcFrequency.Ticks - _executionTimings[name]; if (!_executionTimingSamples.TryGetValue(name, out var s)) diff --git a/src/DotRecast.Detour.Crowd/MoveRequestState.cs b/src/DotRecast.Detour.Crowd/DtMoveRequestState.cs similarity index 90% rename from src/DotRecast.Detour.Crowd/MoveRequestState.cs rename to src/DotRecast.Detour.Crowd/DtMoveRequestState.cs index b0d6830..5bfc329 100644 --- a/src/DotRecast.Detour.Crowd/MoveRequestState.cs +++ b/src/DotRecast.Detour.Crowd/DtMoveRequestState.cs @@ -1,6 +1,6 @@ namespace DotRecast.Detour.Crowd { - public enum MoveRequestState + public enum DtMoveRequestState { DT_CROWDAGENT_TARGET_NONE, DT_CROWDAGENT_TARGET_FAILED, diff --git a/src/DotRecast.Recast.Demo/Tools/CrowdProfilingTool.cs b/src/DotRecast.Recast.Demo/Tools/CrowdProfilingTool.cs index e1c87f3..853de9f 100644 --- a/src/DotRecast.Recast.Demo/Tools/CrowdProfilingTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/CrowdProfilingTool.cs @@ -315,13 +315,13 @@ public class CrowdProfilingTool private bool NeedsNewTarget(DtCrowdAgent ag) { - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_NONE - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_FAILED) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_NONE + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED) { return true; } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VALID) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VALID) { float dx = ag.targetPos.x - ag.npos.x; float dy = ag.targetPos.y - ag.npos.y; @@ -373,14 +373,14 @@ public class CrowdProfilingTool col = DuRGBA(120, 80, 160, 128); } - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) col = DuLerpCol(col, DuRGBA(255, 255, 32, 128), 128); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) col = DuLerpCol(col, DuRGBA(255, 64, 32, 128), 128); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_FAILED) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED) col = DuRGBA(255, 32, 16, 128); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) col = DuLerpCol(col, DuRGBA(64, 255, 0, 128), 128); dd.DebugDrawCylinder(pos.x - radius, pos.y + radius * 0.1f, pos.z - radius, pos.x + radius, pos.y + height, diff --git a/src/DotRecast.Recast.Demo/Tools/CrowdTool.cs b/src/DotRecast.Recast.Demo/Tools/CrowdTool.cs index 971b292..6433661 100644 --- a/src/DotRecast.Recast.Demo/Tools/CrowdTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/CrowdTool.cs @@ -538,14 +538,14 @@ public class CrowdTool : IRcTool RcVec3f pos = ag.npos; int col = DuRGBA(220, 220, 220, 128); - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) col = DuLerpCol(col, DuRGBA(128, 0, 255, 128), 32); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) col = DuLerpCol(col, DuRGBA(128, 0, 255, 128), 128); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_FAILED) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED) col = DuRGBA(255, 32, 16, 128); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) col = DuLerpCol(col, DuRGBA(64, 255, 0, 128), 128); dd.DebugDrawCylinder(pos.x - radius, pos.y + radius * 0.1f, pos.z - radius, pos.x + radius, pos.y + height, @@ -597,14 +597,14 @@ public class CrowdTool : IRcTool RcVec3f dvel = ag.dvel; int col = DuRGBA(220, 220, 220, 192); - if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING - || ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) + if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_REQUESTING + || ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) col = DuLerpCol(col, DuRGBA(128, 0, 255, 192), 48); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) col = DuLerpCol(col, DuRGBA(128, 0, 255, 192), 128); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_FAILED) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_FAILED) col = DuRGBA(255, 32, 16, 192); - else if (ag.targetState == MoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) + else if (ag.targetState == DtMoveRequestState.DT_CROWDAGENT_TARGET_VELOCITY) col = DuLerpCol(col, DuRGBA(64, 255, 0, 192), 128); dd.DebugDrawCircle(pos.x, pos.y + height, pos.z, radius, col, 2.0f);