Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
Evil Factory
2026-04-09 09:12:16 -03:00
198 changed files with 5587 additions and 3462 deletions
@@ -39,6 +39,12 @@ namespace Barotrauma.Networking
public static int MaxEventPacketsPerUpdate = 4;
/// <summary>
/// When enabled, uses more lenient Lidgren handshake timeouts (longer connection timeout, more retry attempts).
/// Useful for local testing when running multiple instances on the same machine under heavy load.
/// </summary>
public static bool UseLenientHandshake;
/// <summary>
/// Interpolates the positional error of a physics body towards zero.
/// </summary>
@@ -33,13 +33,7 @@ namespace Barotrauma.Networking
/// regarding its relation to values other than the input.
/// </summary>
public static ushort GetIdOlderThan(ushort id)
#if DEBUG
// Debug implementation has some RNG to discourage bad assumptions about the return value
=> unchecked((ushort)(id - 1 - Rand.Int(500, sync: Rand.RandSync.Unsynced)));
#else
// Release implementation favors performance
=> unchecked((ushort)(id - 1));
#endif
public static ushort Difference(ushort id1, ushort id2)
{
@@ -15,13 +15,18 @@ sealed class SteamAuthTicketForEosHostAuthenticator : Authenticator
{
string ticketData = ToolBoxCore.ByteArrayToHexString(ticket.Data);
var client = new RestClient(ServerUrl);
var request = new RestRequest(ServerFile, Method.GET);
var client = RestFactory.CreateClient(ServerUrl);
var request = RestFactory.CreateRequest(ServerFile);
request.AddParameter("authticket", ticketData);
request.AddParameter("request_version", RemoteRequestVersion);
var response = await client.ExecuteAsync(request, Method.GET);
if (response.ErrorException != null)
{
DebugConsole.AddWarning($"Connection error: Failed to verify Steam auth ticket for EOS host " +
$"({response.ErrorException.Message}).");
return AccountInfo.None;
}
if (!response.IsSuccessful) { return AccountInfo.None; }
try
@@ -458,7 +458,7 @@ namespace Barotrauma.Networking
private set;
}
[Serialize(300.0f, IsPropertySaveable.Yes)]
[Serialize(30.0f, IsPropertySaveable.Yes)]
public float RespawnInterval
{
get;