From b17019db95865cc0551aa3a5a967e885a7f8b50d Mon Sep 17 00:00:00 2001 From: Juan Pablo Arce Date: Tue, 9 Aug 2022 13:37:15 -0300 Subject: [PATCH 1/4] v0.18.15.1 --- .../BarotraumaClient/ClientSource/Map/MapEntity.cs | 14 +++++++++----- .../ClientSource/Networking/Voip/VoipClient.cs | 7 +++---- .../ClientSource/Screens/SubEditorScreen.cs | 2 +- .../Serialization/SerializableEntityEditor.cs | 13 +++++++++---- Barotrauma/BarotraumaShared/changelog.txt | 8 ++++++++ 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/Barotrauma/BarotraumaClient/ClientSource/Map/MapEntity.cs b/Barotrauma/BarotraumaClient/ClientSource/Map/MapEntity.cs index 0b0bec78b..95d24132c 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Map/MapEntity.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Map/MapEntity.cs @@ -232,8 +232,7 @@ namespace Barotrauma { foreach (MapEntity e in mapEntityList) { - if (!e.SelectableInEditor) continue; - + if (!e.SelectableInEditor) { continue; } if (e.IsMouseOn(position)) { int i = 0; @@ -243,9 +242,7 @@ namespace Barotrauma { i++; } - highlightedEntities.Insert(i, e); - if (i == 0) highLightedEntity = e; } } @@ -741,7 +738,14 @@ namespace Barotrauma /// public static void DrawSelecting(SpriteBatch spriteBatch, Camera cam) { - if (GUI.MouseOn != null) return; + if (Screen.Selected is SubEditorScreen subEditor) + { + if (subEditor.IsMouseOnEditorGUI()) { return; } + } + else if (GUI.MouseOn != null) + { + return; + } Vector2 position = PlayerInput.MousePosition; position = cam.ScreenToWorld(position); diff --git a/Barotrauma/BarotraumaClient/ClientSource/Networking/Voip/VoipClient.cs b/Barotrauma/BarotraumaClient/ClientSource/Networking/Voip/VoipClient.cs index 8ce374562..eabc6004a 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Networking/Voip/VoipClient.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Networking/Voip/VoipClient.cs @@ -121,10 +121,9 @@ namespace Barotrauma.Networking { client.VoipSound.SetRange(ChatMessage.SpeakRange * 0.4f, ChatMessage.SpeakRange); } - if (messageType != ChatMessageType.Radio && Character.Controlled != null && !GameSettings.CurrentConfig.Audio.DisableVoiceChatFilters) - { - client.VoipSound.UseMuffleFilter = SoundPlayer.ShouldMuffleSound(Character.Controlled, client.Character.WorldPosition, ChatMessage.SpeakRange, client.Character.CurrentHull); - } + client.VoipSound.UseMuffleFilter = + messageType != ChatMessageType.Radio && Character.Controlled != null && !GameSettings.CurrentConfig.Audio.DisableVoiceChatFilters && + SoundPlayer.ShouldMuffleSound(Character.Controlled, client.Character.WorldPosition, ChatMessage.SpeakRange, client.Character.CurrentHull); } GameMain.NetLobbyScreen?.SetPlayerSpeaking(client); diff --git a/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs b/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs index 66c404987..f121ce761 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs @@ -4801,7 +4801,7 @@ namespace Barotrauma /// /// GUI.MouseOn doesn't get updated while holding primary mouse and we need it to /// - private bool IsMouseOnEditorGUI() + public bool IsMouseOnEditorGUI() { if (GUI.MouseOn == null) { return false; } diff --git a/Barotrauma/BarotraumaClient/ClientSource/Serialization/SerializableEntityEditor.cs b/Barotrauma/BarotraumaClient/ClientSource/Serialization/SerializableEntityEditor.cs index 636331079..105d82f06 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Serialization/SerializableEntityEditor.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Serialization/SerializableEntityEditor.cs @@ -700,9 +700,12 @@ namespace Barotrauma List prevSelected = MapEntity.SelectedList.ToList(); //reselect the entities that were selected during editing //otherwise multi-editing won't work when we deselect the entities with unapplied changes in the textbox - foreach (var entity in editedEntities) - { - MapEntity.SelectedList.Add(entity); + if (editedEntities.Count > 1) + { + foreach (var entity in editedEntities) + { + MapEntity.SelectedList.Add(entity); + } } if (SetPropertyValue(property, entity, textBox.Text)) { @@ -1448,7 +1451,9 @@ namespace Barotrauma var component = otherComponents[componentIndex]; Debug.Assert(component.GetType() == parentObject.GetType()); SafeAdd(component, property); - if (value is string stringValue && Enum.TryParse(property.PropertyType, stringValue, out var enumValue)) + if (value is string stringValue && + property.PropertyType.IsEnum && + Enum.TryParse(property.PropertyType, stringValue, out var enumValue)) { property.PropertyInfo.SetValue(component, enumValue); } diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index 635a98b76..335b95f90 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,3 +1,11 @@ +--------------------------------------------------------------------------------------------------------- +v0.18.15.1 +--------------------------------------------------------------------------------------------------------- + +- Fixed frequent crashing in the submarine editor. The crashes were caused by modifying multiple entities at the same time, such as by selecting an entity of the same type as the last entity that was edited. +- Fixed dragged objects becoming invisible if you bring the cursor over a UI element in the submarine editor. +- Fixed a bug that sometimes caused radio voice chat to be muffled. + --------------------------------------------------------------------------------------------------------- v0.18.15.0 --------------------------------------------------------------------------------------------------------- From 0a45e81c836379a2ba70c8644e9320e0d71e6fce Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 20 Aug 2022 11:36:40 +0300 Subject: [PATCH 2/4] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 78ce050fd..9e14f5ba4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -52,7 +52,8 @@ body: label: Version description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu. options: - - 0.18.15.0 + - 0.18.15.1 + - 0.19.1.0 (unstable) - Other validations: required: true From 975d9b2e3d272d6e2a4166f4670b4b5d7c84d532 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Fri, 26 Aug 2022 16:51:56 +0300 Subject: [PATCH 3/4] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9e14f5ba4..375fc0bf6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -52,8 +52,8 @@ body: label: Version description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu. options: - - 0.18.15.1 - - 0.19.1.0 (unstable) + - 0.18.15.1 / 0.18.15.2 on macOS + - 0.19.2.0 (unstable) - Other validations: required: true From af4b63519bce52396333fc93f9e0ffec31ff6f9d Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Fri, 2 Sep 2022 20:28:47 +0300 Subject: [PATCH 4/4] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 375fc0bf6..ca60d65a8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -53,7 +53,7 @@ body: description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu. options: - 0.18.15.1 / 0.18.15.2 on macOS - - 0.19.2.0 (unstable) + - 0.19.3.0 (unstable) - Other validations: required: true