mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 22:58:01 +03:00
SteamPort isn't used anymore here
This commit is contained in:
parent
480137a490
commit
f005600957
@ -69,9 +69,6 @@ namespace Steamworks
|
|||||||
|
|
||||||
uint ipaddress = 0; // Any Port
|
uint ipaddress = 0; // Any Port
|
||||||
|
|
||||||
if ( init.SteamPort == 0 )
|
|
||||||
init = init.WithRandomSteamPort();
|
|
||||||
|
|
||||||
if ( init.IpAddress != null )
|
if ( init.IpAddress != null )
|
||||||
ipaddress = Utility.IpToInt32( init.IpAddress );
|
ipaddress = Utility.IpToInt32( init.IpAddress );
|
||||||
|
|
||||||
@ -82,9 +79,9 @@ namespace Steamworks
|
|||||||
//
|
//
|
||||||
// Get other interfaces
|
// Get other interfaces
|
||||||
//
|
//
|
||||||
if ( !SteamInternal.GameServer_Init( ipaddress, init.SteamPort, init.GamePort, init.QueryPort, secure, init.VersionString ) )
|
if ( !SteamInternal.GameServer_Init( ipaddress, 0, init.GamePort, init.QueryPort, secure, init.VersionString ) )
|
||||||
{
|
{
|
||||||
throw new System.Exception( $"InitGameServer returned false ({ipaddress},{init.SteamPort},{init.GamePort},{init.QueryPort},{secure},\"{init.VersionString}\")" );
|
throw new System.Exception( $"InitGameServer returned false ({ipaddress},{0},{init.GamePort},{init.QueryPort},{secure},\"{init.VersionString}\")" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -14,7 +14,6 @@ namespace Steamworks
|
|||||||
public struct SteamServerInit
|
public struct SteamServerInit
|
||||||
{
|
{
|
||||||
public IPAddress IpAddress;
|
public IPAddress IpAddress;
|
||||||
public ushort SteamPort;
|
|
||||||
public ushort GamePort;
|
public ushort GamePort;
|
||||||
public ushort QueryPort;
|
public ushort QueryPort;
|
||||||
public bool Secure;
|
public bool Secure;
|
||||||
@ -52,16 +51,6 @@ namespace Steamworks
|
|||||||
Secure = true;
|
Secure = true;
|
||||||
VersionString = "1.0.0.0";
|
VersionString = "1.0.0.0";
|
||||||
IpAddress = null;
|
IpAddress = null;
|
||||||
SteamPort = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Set the Steam quert port
|
|
||||||
/// </summary>
|
|
||||||
public SteamServerInit WithRandomSteamPort()
|
|
||||||
{
|
|
||||||
SteamPort = (ushort)new Random().Next( 10000, 60000 );
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user