diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/Afflictions/AfflictionHusk.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/Afflictions/AfflictionHusk.cs index fbed88ebec..95d2647ecb 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/Afflictions/AfflictionHusk.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/Afflictions/AfflictionHusk.cs @@ -296,7 +296,6 @@ private IEnumerable CreateAIHusk() var client = GameMain.Server?.ConnectedClients.FirstOrDefault(c => c.Character == character); #endif character.Enabled = false; - Entity.Spawner.AddEntityToRemoveQueue(character); UnsubscribeFromDeathEvent(); Identifier huskedSpeciesName = GetHuskedSpeciesName(character.Params, Prefab as AfflictionPrefabHusk); @@ -385,6 +384,7 @@ private IEnumerable CreateAIHusk() } husk.SetStun(5); + Entity.Spawner.AddEntityToRemoveQueue(character); yield return new WaitForSeconds(5, false); #if CLIENT husk?.PlaySound(CharacterSound.SoundType.Idle); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Networking/EntitySpawner.cs b/Barotrauma/BarotraumaShared/SharedSource/Networking/EntitySpawner.cs index 885953314a..6ca6be3f4d 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Networking/EntitySpawner.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Networking/EntitySpawner.cs @@ -366,6 +366,12 @@ public void AddEntityToRemoveQueue(Entity entity) Client client = GameMain.Server.ConnectedClients.Find(c => c.Character == character); if (client != null) GameMain.Server.SetClientCharacter(client, null); } +#endif +#if CLIENT + if (GameMain.IsSingleplayer && character != null && Character.Controlled == character && character.IsOnPlayerTeam) + { + GameMain.GameSession.CrewManager.SelectNextCharacter(); + } #endif }