Allow zoom command to modify an eye's PVS range (#29245)

Allow zoom command to modify an eye's PVS range

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2024-07-03 18:44:55 +12:00
committed by GitHub
parent a2a3233f5e
commit 1faa1b5df6
6 changed files with 50 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ public sealed class ContentEyeSystem : SharedContentEyeSystem
{
[Dependency] private readonly IPlayerManager _player = default!;
public void RequestZoom(EntityUid uid, Vector2 zoom, bool ignoreLimit, ContentEyeComponent? content = null)
public void RequestZoom(EntityUid uid, Vector2 zoom, bool ignoreLimit, bool scalePvs, ContentEyeComponent? content = null)
{
if (!Resolve(uid, ref content, false))
return;
@@ -19,6 +19,14 @@ public sealed class ContentEyeSystem : SharedContentEyeSystem
TargetZoom = zoom,
IgnoreLimit = ignoreLimit,
});
if (scalePvs)
RequestPvsScale(Math.Max(zoom.X, zoom.Y));
}
public void RequestPvsScale(float scale)
{
RaiseNetworkEvent(new RequestPvsScaleEvent(scale));
}
public void RequestToggleFov()