diff --git a/Facepunch.Steamworks/SteamServer.cs b/Facepunch.Steamworks/SteamServer.cs
index 0270256..20d70c1 100644
--- a/Facepunch.Steamworks/SteamServer.cs
+++ b/Facepunch.Steamworks/SteamServer.cs
@@ -69,9 +69,6 @@ namespace Steamworks
uint ipaddress = 0; // Any Port
- if ( init.SteamPort == 0 )
- init = init.WithRandomSteamPort();
-
if ( init.IpAddress != null )
ipaddress = Utility.IpToInt32( init.IpAddress );
@@ -82,9 +79,9 @@ namespace Steamworks
//
// 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}\")" );
}
//
diff --git a/Facepunch.Steamworks/Structs/ServerInit.cs b/Facepunch.Steamworks/Structs/ServerInit.cs
index 02e3604..962215e 100644
--- a/Facepunch.Steamworks/Structs/ServerInit.cs
+++ b/Facepunch.Steamworks/Structs/ServerInit.cs
@@ -14,7 +14,6 @@ namespace Steamworks
public struct SteamServerInit
{
public IPAddress IpAddress;
- public ushort SteamPort;
public ushort GamePort;
public ushort QueryPort;
public bool Secure;
@@ -52,18 +51,8 @@ namespace Steamworks
Secure = true;
VersionString = "1.0.0.0";
IpAddress = null;
- SteamPort = 0;
}
- ///
- /// Set the Steam quert port
- ///
- public SteamServerInit WithRandomSteamPort()
- {
- SteamPort = (ushort)new Random().Next( 10000, 60000 );
- return this;
- }
-
///
/// If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server API to use
/// "GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets for the master