Engine update to v0.4.26 (Network View Bubble)
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
using Content.Shared.GameObjects.Components.Mobs;
|
using Content.Shared.GameObjects.Components.Mobs;
|
||||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Server.GameStates;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
@@ -19,6 +20,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
|||||||
public sealed class ServerActionsComponent : SharedActionsComponent
|
public sealed class ServerActionsComponent : SharedActionsComponent
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IServerEntityManager _entityManager = default!;
|
[Dependency] private readonly IServerEntityManager _entityManager = default!;
|
||||||
|
[Dependency] private readonly IServerGameStateManager _stateManager = default!;
|
||||||
|
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
@@ -174,7 +176,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
|||||||
// ensure it's within their clickable range
|
// ensure it's within their clickable range
|
||||||
var targetWorldPos = target.ToMapPos(EntityManager);
|
var targetWorldPos = target.ToMapPos(EntityManager);
|
||||||
var rangeBox = new Box2(player.Transform.WorldPosition, player.Transform.WorldPosition)
|
var rangeBox = new Box2(player.Transform.WorldPosition, player.Transform.WorldPosition)
|
||||||
.Enlarged(_entityManager.MaxUpdateRange);
|
.Enlarged(_stateManager.PvsRange);
|
||||||
if (!rangeBox.Contains(targetWorldPos))
|
if (!rangeBox.Contains(targetWorldPos))
|
||||||
{
|
{
|
||||||
Logger.DebugS("action", "user {0} attempted to" +
|
Logger.DebugS("action", "user {0} attempted to" +
|
||||||
|
|||||||
Submodule RobustToolbox updated: ef22842b90...e16732eb7b
Reference in New Issue
Block a user