Stop mind ejection from logging errors on deleted entities. (#15760)

This commit is contained in:
Leon Friedrich 2023-04-25 12:01:00 +12:00 committed by GitHub
parent 110060678f
commit 56b9afd111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -56,12 +56,10 @@ public sealed class MindSystem : EntitySystem
/// </summary>
public void InternalEjectMind(EntityUid uid, MindComponent? mind = null)
{
if (!Resolve(uid, ref mind))
if (!Resolve(uid, ref mind, false))
return;
if (!Deleted(uid))
RaiseLocalEvent(uid, new MindRemovedMessage(), true);
RaiseLocalEvent(uid, new MindRemovedMessage(), true);
mind.Mind = null;
}