Minor re-apply net state change (#4392)

Slightly faster than checking deleted first, at least for now.
This commit is contained in:
metalgearsloth
2023-09-15 03:56:51 +10:00
committed by GitHub
parent 814d6fe2d0
commit 71c46828c2

View File

@@ -780,10 +780,10 @@ namespace Robust.Client.GameStates
continue;
// Original entity referencing the NetEntity may have been deleted.
if (_entityManager.Deleted(uid))
if (!metas.TryGetComponent(uid, out var meta))
continue;
_toApply[uid] = (_entityManager.GetNetEntity(uid), false, GameTick.Zero, null, null);
_toApply[uid] = (_entityManager.GetNetEntity(uid, meta), false, GameTick.Zero, null, null);
}
var queuedBroadphaseUpdates = new List<(EntityUid, TransformComponent)>(enteringPvs);