Я ебал NetEntity
This commit is contained in:
@@ -35,7 +35,6 @@ using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
using TerraFX.Interop.Windows;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
using Direction = Robust.Shared.Maths.Direction;
|
||||
|
||||
|
||||
@@ -182,9 +182,9 @@ namespace Content.Client.White.Radials;
|
||||
public SortedSet<Radial> GetRadials(EntityUid target, EntityUid user, List<Type> verbTypes,
|
||||
bool force = false)
|
||||
{
|
||||
if (!target.IsClientSide())
|
||||
if (!IsClientSide(target))
|
||||
{
|
||||
RaiseNetworkEvent(new RequestServerRadialsEvent(target, verbTypes, adminRequest: force));
|
||||
RaiseNetworkEvent(new RequestServerRadialsEvent(GetNetEntity(target), verbTypes, adminRequest: force));
|
||||
}
|
||||
|
||||
// Some admin menu interactions will try get verbs for entities that have not yet been sent to the player.
|
||||
@@ -216,10 +216,10 @@ namespace Content.Client.White.Radials;
|
||||
return;
|
||||
}
|
||||
|
||||
if (radial.ClientExclusive || target.IsClientSide())
|
||||
if (radial.ClientExclusive || IsClientSide(target))
|
||||
ExecuteRadial(radial, user.Value, target);
|
||||
else
|
||||
EntityManager.RaisePredictiveEvent(new ExecuteRadialEvent(target, radial));
|
||||
EntityManager.RaisePredictiveEvent(new ExecuteRadialEvent(GetNetEntity(target), radial));
|
||||
}
|
||||
|
||||
private void HandleRadialsResponse(RadialsResponseEvent msg)
|
||||
|
||||
@@ -22,6 +22,7 @@ public sealed class RadialUIController : UIController, IOnStateEntered<GameplayS
|
||||
{
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
//[Dependency] private readonly ContextMenuUIController _context = default!;
|
||||
|
||||
[UISystemDependency] private readonly CombatModeSystem _combatMode = default!;
|
||||
@@ -108,7 +109,7 @@ public sealed class RadialUIController : UIController, IOnStateEntered<GameplayS
|
||||
|
||||
private void HandleVerbsResponse(RadialsResponseEvent msg)
|
||||
{
|
||||
if (OpenMenu == null || CurrentTarget != msg.Entity)
|
||||
if (OpenMenu == null || CurrentTarget != _entityManager.GetEntity(msg.Entity))
|
||||
return;
|
||||
|
||||
if (msg.Radials == null)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Numerics;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Client.Gameplay;
|
||||
using Content.Client.Resources;
|
||||
using Content.Client.Viewport;
|
||||
|
||||
Reference in New Issue
Block a user