v1.6.17.0 (Unto the Breach update)

This commit is contained in:
Regalis11
2024-10-22 17:29:04 +03:00
parent e74b3cdb17
commit 6e6c17e100
417 changed files with 17166 additions and 5870 deletions
@@ -5,4 +5,6 @@ namespace Barotrauma.Networking;
sealed class EosP2PConnection : P2PConnection<EosP2PEndpoint>
{
public EosP2PConnection(EosP2PEndpoint endpoint) : base(endpoint) { }
public override bool AddressMatches(NetworkConnection other)
=> Endpoint == other.Endpoint;
}
@@ -10,5 +10,10 @@ namespace Barotrauma.Networking
{
NetConnection = netConnection;
}
public override bool AddressMatches(NetworkConnection other)
=> other is LidgrenConnection { Endpoint: LidgrenEndpoint otherEndpoint }
&& Endpoint is LidgrenEndpoint endpoint
&& endpoint.Address == otherEndpoint.Address;
}
}
@@ -38,6 +38,11 @@ namespace Barotrauma.Networking
public bool EndpointMatches(Endpoint endPoint)
=> Endpoint == endPoint;
/// <summary>
/// Similar to EndpointMatches but ignores port on LidgrenEndpoint
/// </summary>
public abstract bool AddressMatches(NetworkConnection other);
public NetworkConnectionStatus Status = NetworkConnectionStatus.Disconnected;
public void SetAccountInfo(AccountInfo newInfo)
@@ -29,6 +29,9 @@ namespace Barotrauma.Networking
{
SetAccountInfo(new AccountInfo(accountId));
}
public override bool AddressMatches(NetworkConnection other)
=> other is PipeConnection;
}
}
@@ -3,7 +3,10 @@
sealed class SteamP2PConnection : P2PConnection<SteamP2PEndpoint>
{
public SteamP2PConnection(SteamId steamId) : this(new SteamP2PEndpoint(steamId)) { }
public SteamP2PConnection(SteamP2PEndpoint endpoint) : base(endpoint) { }
public override bool AddressMatches(NetworkConnection other)
=> Endpoint == other.Endpoint;
}
}