Delete ghost when respawning (#3519)

* Delete ghost when respawning

Fix session.AttachedEntity not being set to null when mind is wiped
Fix MindComponent not getting disconnected when Mind is wiped
Rename OwnedMob to OwnedComponent

* Update Content.Server/GameTicking/GameTicker.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
ShadowCommander
2021-03-11 01:37:16 -08:00
committed by GitHub
parent 8fc4895c1f
commit 481fee135b
5 changed files with 24 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using Content.Server.Mobs;
using Robust.Server.Player;
using Robust.Shared.Network;
@@ -33,7 +33,8 @@ namespace Content.Server.Players
public void WipeMind()
{
Mind?.ChangeOwningPlayer(null);
Mind?.TransferTo(null);
Mind?.RemoveOwningPlayer();
Mind = null;
}