Unstable 1.8.4.0
This commit is contained in:
+2
@@ -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;
|
||||
}
|
||||
|
||||
+5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -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)
|
||||
|
||||
+3
@@ -29,6 +29,9 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
SetAccountInfo(new AccountInfo(accountId));
|
||||
}
|
||||
|
||||
public override bool AddressMatches(NetworkConnection other)
|
||||
=> other is PipeConnection;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user