Make NPC steering actually debuggable (#14142)

This commit is contained in:
metalgearsloth
2023-02-17 12:30:10 +11:00
committed by GitHub
parent 85227a4c09
commit 344238c0f1
2 changed files with 20 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ namespace Content.Client.NPC
[Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IResourceCache _cache = default!;
[Dependency] private readonly NPCSteeringSystem _steering = default!;
public PathfindingDebugMode Modes
{
@@ -37,6 +38,15 @@ namespace Content.Client.NPC
overlayManager.AddOverlay(new PathfindingOverlay(EntityManager, _eyeManager, _inputManager, _mapManager, _cache, this));
}
if ((value & PathfindingDebugMode.Steering) != 0x0)
{
_steering.DebugEnabled = true;
}
else
{
_steering.DebugEnabled = false;
}
_modes = value;
RaiseNetworkEvent(new RequestPathfindingDebugMessage()