Goes in-game now

This commit is contained in:
Vera Aguilera Puerto
2021-12-06 15:34:46 +01:00
parent af4eb3c7cd
commit c57b07a4d0
43 changed files with 129 additions and 130 deletions

View File

@@ -149,10 +149,8 @@ namespace Content.Server.Storage.EntitySystems
foreach (var session in _sessionCache)
{
var attachedEntity = session.AttachedEntity;
// The component manages the set of sessions, so this invalid session should be removed soon.
if (attachedEntity == default || !IoCManager.Resolve<IEntityManager>().EntityExists(attachedEntity))
if (session.AttachedEntity is not {} attachedEntity || !IoCManager.Resolve<IEntityManager>().EntityExists(attachedEntity))
continue;
if (storageMap != IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(attachedEntity).MapID)