]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix note heisentest (#41244)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sat, 1 Nov 2025 23:34:19 +0000 (12:34 +1300)
committerGitHub <noreply@github.com>
Sat, 1 Nov 2025 23:34:19 +0000 (23:34 +0000)
Content.IntegrationTests/Tests/Interaction/InteractionTest.cs

index 746717e7856f1671bcf6c2168a562b20bf0d11e2..245aeab9ee3db662d2ef1dd922afff9275ef9387 100644 (file)
@@ -228,14 +228,14 @@ public abstract partial class InteractionTest
         ServerSession = sPlayerMan.GetSessionById(ClientSession.UserId);
 
         // Spawn player entity & attach
-        EntityUid? old = default;
+        NetEntity? old = default;
         await Server.WaitPost(() =>
         {
             // Fuck you mind system I want an hour of my life back
             // Mind system is a time vampire
             SEntMan.System<SharedMindSystem>().WipeMind(ServerSession.ContentData()?.Mind);
 
-            old = cPlayerMan.LocalEntity;
+            CEntMan.TryGetNetEntity(cPlayerMan.LocalEntity, out old);
             SPlayer = SEntMan.SpawnEntity(PlayerPrototype, SEntMan.GetCoordinates(PlayerCoords));
             Player = SEntMan.GetNetEntity(SPlayer);
             Server.PlayerMan.SetAttachedEntity(ServerSession, SPlayer);
@@ -251,8 +251,8 @@ public abstract partial class InteractionTest
         // Delete old player entity.
         await Server.WaitPost(() =>
         {
-            if (old != null)
-                SEntMan.DeleteEntity(old.Value);
+            if (SEntMan.TryGetEntity(old, out var uid))
+                SEntMan.DeleteEntity(uid);
         });
 
         // Change UI state to in-game.