Fix note heisentest (#41244)

This commit is contained in:
Leon Friedrich 2025-11-02 12:34:19 +13:00 committed by Vanessa
parent b8cd376ea7
commit 21a4b9ba8e
1 changed files with 4 additions and 4 deletions

View 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.