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