Merge branch 'Regalis11:master' into master
This commit is contained in:
@@ -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
|
||||
/// </summary>
|
||||
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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -4807,7 +4807,7 @@ namespace Barotrauma
|
||||
/// <summary>
|
||||
/// GUI.MouseOn doesn't get updated while holding primary mouse and we need it to
|
||||
/// </summary>
|
||||
private bool IsMouseOnEditorGUI()
|
||||
public bool IsMouseOnEditorGUI()
|
||||
{
|
||||
if (GUI.MouseOn == null) { return false; }
|
||||
|
||||
|
||||
@@ -700,9 +700,12 @@ namespace Barotrauma
|
||||
List<MapEntity> 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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user