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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user