Fixed characters not appearing in the round summary in mp, minor CrewManager refactoring
This commit is contained in:
@@ -148,7 +148,7 @@ namespace Barotrauma
|
||||
frame.RemoveChild(child);
|
||||
}
|
||||
|
||||
List<Character> aliveCharacters = crewManager.characters.FindAll(c => !c.IsDead && c.AIController is HumanAIController);
|
||||
List<Character> aliveCharacters = crewManager.GetCharacters().FindAll(c => !c.IsDead && c.AIController is HumanAIController);
|
||||
|
||||
characterFrameBottom = 0;
|
||||
|
||||
|
||||
@@ -192,9 +192,9 @@ namespace Barotrauma
|
||||
if (controlled == this) controlled = null;
|
||||
|
||||
if (GameMain.GameSession?.CrewManager != null &&
|
||||
GameMain.GameSession.CrewManager.characters.Contains(this))
|
||||
GameMain.GameSession.CrewManager.GetCharacters().Contains(this))
|
||||
{
|
||||
GameMain.GameSession.CrewManager.characters.Remove(this);
|
||||
GameMain.GameSession.CrewManager.RemoveCharacter(this);
|
||||
}
|
||||
|
||||
if (GameMain.Client != null && GameMain.Client.Character == this) GameMain.Client.Character = null;
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace Barotrauma
|
||||
|
||||
if (configPath == Character.HumanConfigFile)
|
||||
{
|
||||
GameMain.GameSession.CrewManager.characters.Add(character);
|
||||
GameMain.GameSession.CrewManager.AddCharacter(character);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user