(618410bf9) Fixed clients crashing when opening the server settings menu
This commit is contained in:
@@ -464,7 +464,8 @@ namespace Barotrauma.Networking
|
||||
((GUIComponent)obj).Visible = !((GUIComponent)obj).Visible;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
InitMonstersEnabled();
|
||||
List<string> monsterNames = MonsterEnabled.Keys.ToList();
|
||||
tempMonsterEnabled = new Dictionary<string, bool>(MonsterEnabled);
|
||||
foreach (string s in monsterNames)
|
||||
|
||||
@@ -656,7 +656,7 @@ namespace Barotrauma.Networking
|
||||
private set;
|
||||
} = new List<Pair<int, int>>();
|
||||
|
||||
public void ReadMonsterEnabled(NetBuffer inc)
|
||||
private void InitMonstersEnabled()
|
||||
{
|
||||
//monster spawn settings
|
||||
if (MonsterEnabled == null)
|
||||
@@ -673,7 +673,11 @@ namespace Barotrauma.Networking
|
||||
if (!MonsterEnabled.ContainsKey(s)) MonsterEnabled.Add(s, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ReadMonsterEnabled(NetBuffer inc)
|
||||
{
|
||||
InitMonstersEnabled();
|
||||
List<string> monsterNames = MonsterEnabled.Keys.ToList();
|
||||
foreach (string s in monsterNames)
|
||||
{
|
||||
@@ -681,7 +685,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
inc.ReadPadBits();
|
||||
}
|
||||
|
||||
|
||||
public void WriteMonsterEnabled(NetBuffer msg, Dictionary<string, bool> monsterEnabled = null)
|
||||
{
|
||||
//monster spawn settings
|
||||
|
||||
Reference in New Issue
Block a user