This commit is contained in:
ShadowCommander
2023-03-26 11:31:13 -07:00
committed by GitHub
parent 0e5dc41fe8
commit bfc4da9377
85 changed files with 1150 additions and 684 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>