]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix cryostorage removing minds of players who have entered ghost role (#24991)
authorc4llv07e <38111072+c4llv07e@users.noreply.github.com>
Wed, 28 Feb 2024 22:09:02 +0000 (01:09 +0300)
committerGitHub <noreply@github.com>
Wed, 28 Feb 2024 22:09:02 +0000 (17:09 -0500)
* 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>
Content.Server/Bed/Cryostorage/CryostorageSystem.cs

index 11184bee0add406d150b5b20a163b54bd8580e52..a3b7fb8d67bedde30593bbbe725809de03c63559 100644 (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);
             }