Fix ghost FOV toggling (#15751)

This commit is contained in:
Leon Friedrich
2023-04-25 13:11:42 +12:00
committed by GitHub
parent 53a33a5853
commit c7ba2a666b
4 changed files with 55 additions and 5 deletions

View File

@@ -1,9 +1,9 @@
using Content.Client.Administration.Managers;
using Content.Client.Movement.Systems;
using Content.Shared.Sandbox;
using Robust.Client.Console;
using Robust.Client.Placement;
using Robust.Client.Placement.Modes;
using Robust.Client.UserInterface;
using Robust.Shared.Map;
using Robust.Shared.Players;
@@ -15,7 +15,7 @@ namespace Content.Client.Sandbox
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
[Dependency] private readonly IMapManager _map = default!;
[Dependency] private readonly IPlacementManager _placement = default!;
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
[Dependency] private readonly ContentEyeSystem _contentEye = default!;
private bool _sandboxEnabled;
public bool SandboxAllowed { get; private set; }
@@ -132,7 +132,7 @@ namespace Content.Client.Sandbox
public void ToggleFov()
{
_consoleHost.ExecuteCommand("togglefov");
_contentEye.RequestToggleFov();
}
public void ToggleShadows()