Remember the first entity a Mind controls for the endround screen (#16950)

This commit is contained in:
Tom Leys
2023-08-01 10:46:06 +12:00
committed by GitHub
parent a9e1f05d15
commit 66ed63dd90
3 changed files with 10 additions and 2 deletions

View File

@@ -413,8 +413,10 @@ public sealed class MindSystem : EntitySystem
InternalEjectMind(oldEntity.Value, oldComp);
SetOwnedEntity(mind, entity, component);
if (mind.OwnedComponent != null)
if (mind.OwnedComponent != null){
InternalAssignMind(mind.OwnedEntity!.Value, mind, mind.OwnedComponent);
mind.OriginalOwnedEntity ??= mind.OwnedEntity;
}
// Don't do the full deletion cleanup if we're transferring to our VisitingEntity
if (alreadyAttached)