Fix cryostorage removing minds of players who have entered ghost role (#24991)

* fix cryo removed minds of players who entered ghost role

Signed-off-by: c4llv07e <kseandi@gmail.com>

* better way to handle cryo with mind in it

Signed-off-by: c4llv07e <kseandi@gmail.com>

---------

Signed-off-by: c4llv07e <kseandi@gmail.com>
This commit is contained in:
c4llv07e
2024-02-29 01:09:02 +03:00
committed by GitHub
parent b1ce9e933b
commit ee614dec5c

View File

@@ -197,7 +197,8 @@ public sealed class CryostorageSystem : SharedCryostorageSystem
if (!CryoSleepRejoiningEnabled || !comp.AllowReEnteringBody)
{
if (userId != null && Mind.TryGetMind(userId.Value, out var mind))
if (userId != null && Mind.TryGetMind(userId.Value, out var mind) &&
HasComp<CryostorageContainedComponent>(mind.Value.Comp.CurrentEntity))
{
_gameTicker.OnGhostAttempt(mind.Value, false);
}