diff --git a/Subsurface/Source/GameSession/GameSession.cs b/Subsurface/Source/GameSession/GameSession.cs index 681b47fd5..bd9ac9724 100644 --- a/Subsurface/Source/GameSession/GameSession.cs +++ b/Subsurface/Source/GameSession/GameSession.cs @@ -364,7 +364,7 @@ namespace Barotrauma { if (gameMode != null) gameMode.AddToGUIUpdateList(); - if (infoFrame != null) infoButton.AddToGUIUpdateList(); + if (infoFrame != null) infoFrame.AddToGUIUpdateList(); } public void Update(float deltaTime) diff --git a/Subsurface/Source/Networking/GameServerSettings.cs b/Subsurface/Source/Networking/GameServerSettings.cs index 090d47082..41432ee04 100644 --- a/Subsurface/Source/Networking/GameServerSettings.cs +++ b/Subsurface/Source/Networking/GameServerSettings.cs @@ -264,6 +264,7 @@ namespace Barotrauma.Networking var traitorsEnabled = TraitorsEnabled; Enum.TryParse(ToolBox.GetAttributeString(doc.Root, "TraitorsEnabled", "No"), out traitorsEnabled); + TraitorsEnabled = traitorsEnabled; GameMain.NetLobbyScreen.SetTraitorsEnabled(traitorsEnabled); FileStreamSender.MaxTransferDuration = new TimeSpan(0,0,ToolBox.GetAttributeInt(doc.Root, "MaxFileTransferDuration", 150)); diff --git a/Subsurface/Source/Particles/ParticleManager.cs b/Subsurface/Source/Particles/ParticleManager.cs index 6bec2ccc1..40adebd87 100644 --- a/Subsurface/Source/Particles/ParticleManager.cs +++ b/Subsurface/Source/Particles/ParticleManager.cs @@ -109,7 +109,18 @@ namespace Barotrauma.Particles { for (int i = 0; i < particleCount; i++) { - if (!particles[i].Update(deltaTime)) RemoveParticle(i); + bool remove = false; + try + { + remove = !particles[i].Update(deltaTime); + } + catch (Exception e) + { + DebugConsole.ThrowError("Particle update failed", e); + remove = true; + } + + if (remove) RemoveParticle(i); } } diff --git a/Subsurface/Source/Screens/EditMapScreen.cs b/Subsurface/Source/Screens/EditMapScreen.cs index 6bae0e7ed..06f926915 100644 --- a/Subsurface/Source/Screens/EditMapScreen.cs +++ b/Subsurface/Source/Screens/EditMapScreen.cs @@ -657,7 +657,7 @@ namespace Barotrauma private GUIFrame CreateWiringPanel() { - GUIFrame frame = new GUIFrame(new Rectangle(0,0,50,300), null, Alignment.Right | Alignment.CenterY, GUI.Style); + GUIFrame frame = new GUIFrame(new Rectangle(0,0,65,300), null, Alignment.Right | Alignment.CenterY, GUI.Style); frame.Padding = new Vector4(5.0f, 5.0f, 5.0f, 5.0f); GUIListBox listBox = new GUIListBox(Rectangle.Empty, GUI.Style, frame); diff --git a/Subsurface/Source/Screens/GameScreen.cs b/Subsurface/Source/Screens/GameScreen.cs index 4d31a95d7..660026c73 100644 --- a/Subsurface/Source/Screens/GameScreen.cs +++ b/Subsurface/Source/Screens/GameScreen.cs @@ -91,8 +91,6 @@ namespace Barotrauma public override void AddToGUIUpdateList() { - if (GameMain.GameSession != null) GameMain.GameSession.AddToGUIUpdateList(); - if (Character.Controlled != null && Character.Controlled.SelectedConstruction != null) { if (Character.Controlled.SelectedConstruction == Character.Controlled.ClosestItem) @@ -100,6 +98,9 @@ namespace Barotrauma Character.Controlled.SelectedConstruction.AddToGUIUpdateList(); } } + + if (GameMain.GameSession != null) GameMain.GameSession.AddToGUIUpdateList(); + Character.AddAllToGUIUpdateList(); }