This commit is contained in:
ShadowCommander
2023-06-18 11:33:19 -07:00
committed by GitHub
parent 8a943fb374
commit dd7032a860
85 changed files with 1432 additions and 711 deletions

View File

@@ -1,3 +1,4 @@
using Content.Server.Mind;
using Robust.Server.Player;
using Robust.Shared.Network;
@@ -37,9 +38,15 @@ namespace Content.Server.Players
public void WipeMind()
{
Mind?.TransferTo(null);
var entityManager = IoCManager.Resolve<IEntityManager>();
var mindSystem = entityManager.System<MindSystem>();
// This will ensure Mind == null
Mind?.ChangeOwningPlayer(null);
if (Mind == null)
return;
mindSystem.TransferTo(Mind, null);
mindSystem.ChangeOwningPlayer(Mind, null);
}
/// <summary>