Mind tweaks & fixes (#21203)

This commit is contained in:
Leon Friedrich
2023-10-25 01:23:56 +11:00
committed by GitHub
parent a2bbda43cc
commit 0880145ac8
11 changed files with 237 additions and 111 deletions

View File

@@ -360,8 +360,7 @@ namespace Content.Server.GameTicking
else if (mind.CurrentEntity != null && TryName(mind.CurrentEntity.Value, out var icName))
playerIcName = icName;
var entity = mind.OriginalOwnedEntity;
if (Exists(entity))
if (TryGetEntity(mind.OriginalOwnedEntity, out var entity))
_pvsOverride.AddGlobalOverride(entity.Value, recursive: true);
var roles = _roles.MindGetAllRoles(mindId);