Predict virtual hands and co (#36617)

These are the easy ones anything else gets slightly spicier.
This commit is contained in:
metalgearsloth
2025-04-19 16:51:12 +10:00
committed by GitHub
parent 63dfd21b14
commit 4682149e74
5 changed files with 23 additions and 52 deletions

View File

@@ -51,7 +51,6 @@ namespace Content.Shared.Interaction
public abstract partial class SharedInteractionSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
@@ -223,24 +222,24 @@ namespace Content.Shared.Interaction
{
if (!item.DeleteOnDrop)
RemCompDeferred<UnremoveableComponent>(uid);
else if (_net.IsServer)
QueueDel(uid);
else
PredictedQueueDel(uid);
}
private void OnUnequipHand(EntityUid uid, UnremoveableComponent item, GotUnequippedHandEvent args)
{
if (!item.DeleteOnDrop)
RemCompDeferred<UnremoveableComponent>(uid);
else if (_net.IsServer)
QueueDel(uid);
else
PredictedQueueDel(uid);
}
private void OnDropped(EntityUid uid, UnremoveableComponent item, DroppedEvent args)
{
if (!item.DeleteOnDrop)
RemCompDeferred<UnremoveableComponent>(uid);
else if (_net.IsServer)
QueueDel(uid);
else
PredictedQueueDel(uid);
}
private bool HandleTryPullObject(ICommonSession? session, EntityCoordinates coords, EntityUid uid)