Fixes ghost NRE in lobby (#1907)

Simply tells the player "You can't ghost here!" when they try it in the lobby, works for both normal ghost and aghost
This commit is contained in:
NuclearWinter
2020-08-25 05:37:54 -06:00
committed by GitHub
parent 318f051fb9
commit a854a86872
2 changed files with 12 additions and 0 deletions

View File

@@ -28,6 +28,12 @@ namespace Content.Server.Observer
}
var mind = player.ContentData().Mind;
if (mind == null)
{
shell.SendText(player, "You can't ghost here!");
return;
}
var canReturn = player.AttachedEntity != null && CanReturn;
var name = player.AttachedEntity?.Name ?? player.Name;