Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Evil Factory
2025-10-02 08:12:37 -03:00
11 changed files with 103 additions and 64 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ body:
label: Version 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. 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: options:
- v1.10.6.0 (Autumn Update 2025 Hotfix 1) - v1.10.7.0 (Autumn Update 2025 Hotfix 2)
- Other - Other
validations: validations:
required: true required: true
@@ -3818,9 +3818,12 @@ namespace Barotrauma.Networking
outMsg.WriteUInt16(eventId); outMsg.WriteUInt16(eventId);
outMsg.WriteUInt16(entityId); outMsg.WriteUInt16(entityId);
outMsg.WriteByte((byte)Submarine.Loaded.Count); outMsg.WriteByte((byte)Submarine.Loaded.Count);
foreach (Submarine sub in Submarine.Loaded) //server has restrictions on the length and number of subs listed in the error (see GameServer.HandleClientError),
//let's adhere to those
foreach (Submarine sub in Submarine.Loaded.Take(5))
{ {
outMsg.WriteString(sub.Info.Name); string subNameTruncated = sub.Info.Name.Length > 16 ? sub.Info.Name.Substring(0, 16) : sub.Info.Name;
outMsg.WriteString(subNameTruncated);
} }
break; break;
} }
@@ -2703,34 +2703,40 @@ namespace Barotrauma
}; };
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), minDifficultyGroup.RectTransform), new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), minDifficultyGroup.RectTransform),
TextManager.Get("minleveldifficulty"), textAlignment: Alignment.CenterLeft, wrap: true); TextManager.Get("minleveldifficulty"), textAlignment: Alignment.CenterLeft, wrap: true);
var numInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), minDifficultyGroup.RectTransform), NumberType.Int) var minLevelDifficultyInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), minDifficultyGroup.RectTransform), NumberType.Int)
{ {
IntValue = (int)(extraSubInfo?.MinLevelDifficulty ?? 0), IntValue = (int)(extraSubInfo?.MinLevelDifficulty ?? 0),
MinValueInt = 0, MinValueInt = 0,
MaxValueInt = 100, MaxValueInt = 100,
OnValueChanged = (numberInput) => OnValueChanged = (numberInput) =>
{
if (GetExtraSubmarineInfo(MainSub?.Info) is { } extraSubInfo)
{ {
extraSubInfo.MinLevelDifficulty = numberInput.IntValue; extraSubInfo.MinLevelDifficulty = numberInput.IntValue;
} }
}
}; };
minDifficultyGroup.RectTransform.MaxSize = numInput.TextBox.RectTransform.MaxSize; minDifficultyGroup.RectTransform.MaxSize = minLevelDifficultyInput.TextBox.RectTransform.MaxSize;
var maxDifficultyGroup = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.25f), extraSettingsContainer.RectTransform), isHorizontal: true) var maxDifficultyGroup = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.25f), extraSettingsContainer.RectTransform), isHorizontal: true)
{ {
Stretch = true Stretch = true
}; };
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), maxDifficultyGroup.RectTransform), new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), maxDifficultyGroup.RectTransform),
TextManager.Get("maxleveldifficulty"), textAlignment: Alignment.CenterLeft, wrap: true); TextManager.Get("maxleveldifficulty"), textAlignment: Alignment.CenterLeft, wrap: true);
numInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), maxDifficultyGroup.RectTransform), NumberType.Int) var maxLevelDifficultyInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), maxDifficultyGroup.RectTransform), NumberType.Int)
{ {
IntValue = (int)(extraSubInfo?.MaxLevelDifficulty ?? 100), IntValue = (int)(extraSubInfo?.MaxLevelDifficulty ?? 100),
MinValueInt = 0, MinValueInt = 0,
MaxValueInt = 100, MaxValueInt = 100,
OnValueChanged = (numberInput) => OnValueChanged = (numberInput) =>
{
if (GetExtraSubmarineInfo(MainSub?.Info) is { } extraSubInfo)
{ {
extraSubInfo.MaxLevelDifficulty = numberInput.IntValue; extraSubInfo.MaxLevelDifficulty = numberInput.IntValue;
} }
}
}; };
maxDifficultyGroup.RectTransform.MaxSize = numInput.TextBox.RectTransform.MaxSize; maxDifficultyGroup.RectTransform.MaxSize = maxLevelDifficultyInput.TextBox.RectTransform.MaxSize;
GUITextBox missionTagsBox = CreateMissionTagsUI(extraSettingsContainer, extraSubInfo?.MissionTags ?? Enumerable.Empty<Identifier>(), ChangeMissionTags); GUITextBox missionTagsBox = CreateMissionTagsUI(extraSettingsContainer, extraSubInfo?.MissionTags ?? Enumerable.Empty<Identifier>(), ChangeMissionTags);
@@ -2810,7 +2816,7 @@ namespace Barotrauma
}; };
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), enemySubmarineRewardGroup.RectTransform), new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), enemySubmarineRewardGroup.RectTransform),
TextManager.Get("enemysub.reward"), textAlignment: Alignment.CenterLeft, wrap: true); TextManager.Get("enemysub.reward"), textAlignment: Alignment.CenterLeft, wrap: true);
numInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), enemySubmarineRewardGroup.RectTransform), NumberType.Int, buttonVisibility: GUINumberInput.ButtonVisibility.ForceHidden) var enemySubRewardInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), enemySubmarineRewardGroup.RectTransform), NumberType.Int, buttonVisibility: GUINumberInput.ButtonVisibility.ForceHidden)
{ {
IntValue = (int)(MainSub?.Info?.EnemySubmarineInfo?.Reward ?? 4000), IntValue = (int)(MainSub?.Info?.EnemySubmarineInfo?.Reward ?? 4000),
MinValueInt = 0, MinValueInt = 0,
@@ -2820,14 +2826,14 @@ namespace Barotrauma
MainSub.Info.EnemySubmarineInfo.Reward = numberInput.IntValue; MainSub.Info.EnemySubmarineInfo.Reward = numberInput.IntValue;
} }
}; };
enemySubmarineRewardGroup.RectTransform.MaxSize = numInput.TextBox.RectTransform.MaxSize; enemySubmarineRewardGroup.RectTransform.MaxSize = enemySubRewardInput.TextBox.RectTransform.MaxSize;
var enemySubmarineDifficultyGroup = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.25f), enemySubmarineSettingsContainer.RectTransform), isHorizontal: true) var enemySubmarineDifficultyGroup = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.25f), enemySubmarineSettingsContainer.RectTransform), isHorizontal: true)
{ {
Stretch = true Stretch = true
}; };
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), enemySubmarineDifficultyGroup.RectTransform), new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), enemySubmarineDifficultyGroup.RectTransform),
TextManager.Get("preferreddifficulty"), textAlignment: Alignment.CenterLeft, wrap: true); TextManager.Get("preferreddifficulty"), textAlignment: Alignment.CenterLeft, wrap: true);
numInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), enemySubmarineDifficultyGroup.RectTransform), NumberType.Int) var enemySubDifficultyInput = new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), enemySubmarineDifficultyGroup.RectTransform), NumberType.Int)
{ {
IntValue = (int)(MainSub?.Info?.EnemySubmarineInfo?.PreferredDifficulty ?? 50), IntValue = (int)(MainSub?.Info?.EnemySubmarineInfo?.PreferredDifficulty ?? 50),
MinValueInt = 0, MinValueInt = 0,
@@ -2837,7 +2843,7 @@ namespace Barotrauma
MainSub.Info.EnemySubmarineInfo.PreferredDifficulty = numberInput.IntValue; MainSub.Info.EnemySubmarineInfo.PreferredDifficulty = numberInput.IntValue;
} }
}; };
enemySubmarineDifficultyGroup.RectTransform.MaxSize = numInput.TextBox.RectTransform.MaxSize; enemySubmarineDifficultyGroup.RectTransform.MaxSize = enemySubDifficultyInput.TextBox.RectTransform.MaxSize;
//-------------------------------------------------------- //--------------------------------------------------------
@@ -3131,6 +3137,8 @@ namespace Barotrauma
if (newExtraSubInfo != null) if (newExtraSubInfo != null)
{ {
missionTagsBox.Text = string.Join(',', newExtraSubInfo.MissionTags); missionTagsBox.Text = string.Join(',', newExtraSubInfo.MissionTags);
newExtraSubInfo.MinLevelDifficulty = minLevelDifficultyInput?.IntValue ?? 0;
newExtraSubInfo.MaxLevelDifficulty = maxLevelDifficultyInput?.IntValue ?? 100;
} }
previewImageButtonHolder.Children.ForEach(c => c.Enabled = MainSub.Info.AllowPreviewImage); previewImageButtonHolder.Children.ForEach(c => c.Enabled = MainSub.Info.AllowPreviewImage);
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.10.6.0</Version> <Version>1.10.7.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</Copyright> <Copyright>Copyright © FakeFish 2018-2024</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.10.6.0</Version> <Version>1.10.7.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</Copyright> <Copyright>Copyright © FakeFish 2018-2024</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.10.6.0</Version> <Version>1.10.7.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</Copyright> <Copyright>Copyright © FakeFish 2018-2024</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.10.6.0</Version> <Version>1.10.7.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.10.6.0</Version> <Version>1.10.7.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -1064,6 +1064,9 @@ namespace Barotrauma.Networking
string errorStr = "Unhandled error report"; string errorStr = "Unhandled error report";
string errorStrNoName = errorStr; string errorStrNoName = errorStr;
bool malformedData = false;
try
{
ClientNetError error = (ClientNetError)inc.ReadByte(); ClientNetError error = (ClientNetError)inc.ReadByte();
switch (error) switch (error)
{ {
@@ -1075,11 +1078,19 @@ namespace Barotrauma.Networking
case ClientNetError.MISSING_ENTITY: case ClientNetError.MISSING_ENTITY:
UInt16 eventID = inc.ReadUInt16(); UInt16 eventID = inc.ReadUInt16();
UInt16 entityID = inc.ReadUInt16(); UInt16 entityID = inc.ReadUInt16();
byte subCount = inc.ReadByte(); int subCount = inc.ReadByte();
List<string> subNames = new List<string>(); List<string> subNames = new List<string>();
for (int i = 0; i < subCount; i++) for (int i = 0; i < Math.Min(subCount, 5); i++)
{ {
subNames.Add(inc.ReadString()); string subName = inc.ReadString();
if (subName == null || subName.Length > 16)
{
malformedData = true;
}
else
{
subNames.Add(subName);
}
} }
Entity entity = Entity.FindEntityByID(entityID); Entity entity = Entity.FindEntityByID(entityID);
if (entity == null) if (entity == null)
@@ -1111,6 +1122,17 @@ namespace Barotrauma.Networking
} }
break; break;
} }
}
catch (Exception e)
{
DebugConsole.ThrowError($"Failed to read error data from the client {ClientLogName(c)}.", e);
malformedData = true;
}
if (malformedData)
{
KickClient(c, "Received malformed error data.");
return;
}
Log(ClientLogName(c) + " has reported an error: " + errorStr, ServerLog.MessageType.Error); Log(ClientLogName(c) + " has reported an error: " + errorStr, ServerLog.MessageType.Error);
GameAnalyticsManager.AddErrorEventOnce("GameServer.HandleClientError:" + errorStrNoName, GameAnalyticsManager.ErrorSeverity.Error, errorStr); GameAnalyticsManager.AddErrorEventOnce("GameServer.HandleClientError:" + errorStrNoName, GameAnalyticsManager.ErrorSeverity.Error, errorStr);
@@ -1133,7 +1155,6 @@ namespace Barotrauma.Networking
{ {
KickClient(c, errorStr); KickClient(c, errorStr);
} }
} }
private void WriteEventErrorData(Client client, string errorStr) private void WriteEventErrorData(Client client, string errorStr)
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.10.6.0</Version> <Version>1.10.7.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
+8 -1
View File
@@ -1,4 +1,11 @@
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------
v1.10.7.0
-------------------------------------------------------------------------------------------------------------------------------------------------
- Additional fixes to multiplayer exploits.
- Fixed crashing when editing a beacon station's, wreck's or enemy sub's min/max level difficulty settings in the sub editor before you have saved the sub for the first time.
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.10.6.0 v1.10.6.0
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------
@@ -9,7 +16,7 @@ v1.10.6.0
- Railgun shells now disappear shortly after the first impact: the change in the previous update (which allowed them to penetrate multiple limbs/targets) had the side-effect that a shell that went through a single limb could fall back on the submarine and still do full damage. - Railgun shells now disappear shortly after the first impact: the change in the previous update (which allowed them to penetrate multiple limbs/targets) had the side-effect that a shell that went through a single limb could fall back on the submarine and still do full damage.
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------
v1.10.5.0 v1.10.5.0 (Autumn Update 2025)
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------
Balance: Balance: