Fix exception when observer tries to take over GhostTakeoverAvailable mob that has a mind.

That method is essentially a `TryTake` method, why would it throw instead of returning false...
This commit is contained in:
Vera Aguilera Puerto
2021-10-23 10:56:37 +02:00
parent dad471562d
commit a29bc600b7
2 changed files with 3 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ namespace Content.Server.Ghost.Roles.Components
var mind = Owner.EnsureComponent<MindComponent>();
if (mind.HasMind)
throw new Exception("MindComponent already has a mind!");
return false;
var sessionMind = session.ContentData()?.Mind;