Skip to content

Commit

Permalink
Make TryQueueDel work as expected on client
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth committed Oct 14, 2024
1 parent 9a7d1a3 commit 677a490
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Robust.Client/GameObjects/ClientEntityManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Robust.Client.GameStates;
using Robust.Client.Player;
using Robust.Client.Timing;
using Robust.Client.UserInterface;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Network;
Expand Down Expand Up @@ -73,6 +74,14 @@ public override void DirtyEntity(EntityUid uid, MetaDataComponent? meta = null)
base.DirtyEntity(uid, meta);
}

public override bool TryQueueDeleteEntity(EntityUid? uid)
{
if (uid == null || !IsClientSide(uid.Value))
return false;

return base.TryQueueDeleteEntity(uid);
}

public override void QueueDeleteEntity(EntityUid? uid)
{
if (uid == null || uid == EntityUid.Invalid)
Expand Down
2 changes: 1 addition & 1 deletion Robust.Shared/GameObjects/EntityManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public virtual void Dirty<T1, T2, T3, T4>(Entity<T1, T2, T3, T4> ent, MetaDataCo
ent.Comp4.LastModifiedTick = CurrentTick;
}

public bool TryQueueDeleteEntity(EntityUid? uid)
public virtual bool TryQueueDeleteEntity(EntityUid? uid)
{
if (uid == null)
return false;
Expand Down

0 comments on commit 677a490

Please sign in to comment.