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

View File

@@ -3818,9 +3818,12 @@ namespace Barotrauma.Networking
outMsg.WriteUInt16(eventId);
outMsg.WriteUInt16(entityId);
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;
}