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:
@@ -22,6 +22,12 @@ namespace Content.Server.Administration
|
|||||||
}
|
}
|
||||||
|
|
||||||
var mind = player.ContentData().Mind;
|
var mind = player.ContentData().Mind;
|
||||||
|
if (mind == null)
|
||||||
|
{
|
||||||
|
shell.SendText(player, "You can't ghost here!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mind.VisitingEntity != null && mind.VisitingEntity.Prototype.ID == "AdminObserver")
|
if (mind.VisitingEntity != null && mind.VisitingEntity.Prototype.ID == "AdminObserver")
|
||||||
{
|
{
|
||||||
var visiting = mind.VisitingEntity;
|
var visiting = mind.VisitingEntity;
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ namespace Content.Server.Observer
|
|||||||
}
|
}
|
||||||
|
|
||||||
var mind = player.ContentData().Mind;
|
var mind = player.ContentData().Mind;
|
||||||
|
if (mind == null)
|
||||||
|
{
|
||||||
|
shell.SendText(player, "You can't ghost here!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var canReturn = player.AttachedEntity != null && CanReturn;
|
var canReturn = player.AttachedEntity != null && CanReturn;
|
||||||
var name = player.AttachedEntity?.Name ?? player.Name;
|
var name = player.AttachedEntity?.Name ?? player.Name;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user