private static void JoinServerRequest(GameServerChangeRequested_t param) { if (BoltNetwork.isRunning || SteamClientDSConfig.Server != null) { return; } AutoJoinAfterMPInvite autoJoinAfterMPInvite = UnityEngine.Object.FindObjectOfType <AutoJoinAfterMPInvite>(); CoopSteamNGUI exists = UnityEngine.Object.FindObjectOfType <CoopSteamNGUI>(); SteamClientDSConfig.serverAddress = param.m_rgchServer; SteamClientDSConfig.password = SteamDSConfig.PasswordToHash(param.m_rgchPassword); if (exists) { if (CoopLobby.IsInLobby) { return; } Debug.Log("todo ?"); } else if (autoJoinAfterMPInvite) { autoJoinAfterMPInvite.invitedToPassword = param.m_rgchPassword; autoJoinAfterMPInvite.SetInvitedToServer(param.m_rgchServer); } }
private void ServerResponded(gameserveritem_t server) { Debug.Log("AutoJoin: Server ping succeeded"); Debug.Log("Starting dedicated client"); SteamDSConfig.isDedicatedServer = false; CoopPeerStarter.DedicatedHost = false; SteamClientDSConfig.isDedicatedClient = true; string[] array = server.GetGameTags().Split(new char[] { ';' }); string guid = (array == null || array.Length <= 0) ? string.Empty : array[0]; SteamClientDSConfig.Guid = guid; SteamClientDSConfig.Server = server; SteamClientDSConfig.serverAddress = server.m_NetAdr.GetConnectionAddressString(); if (!string.IsNullOrEmpty(this.invitedToPassword)) { SteamClientDSConfig.password = SteamDSConfig.PasswordToHash(this.invitedToPassword); } else { SteamClientDSConfig.password = string.Empty; } SteamClientDSConfig.adminPassword = string.Empty; SteamClientDSConfig.EndPoint = UdpEndPoint.Parse(SteamClientDSConfig.serverAddress); }
private string GetPasswordArg(string[] args, string name, string defaultValue) { string text = this.GetStringArg(args, name, defaultValue); if (!string.IsNullOrEmpty(text)) { text = SteamDSConfig.PasswordToHash(text); } return(text); }
public void OnClientContinueGameDS(gameserveritem_t server) { Debug.Log("Starting dedicated client"); SteamDSConfig.isDedicatedServer = false; CoopPeerStarter.DedicatedHost = false; SteamClientDSConfig.isDedicatedClient = true; string[] array = server.GetGameTags().Split(new char[] { ';' }); string guid = (array == null || array.Length <= 0) ? string.Empty : array[0]; SteamClientDSConfig.Guid = guid; SteamClientDSConfig.Server = server; SteamClientDSConfig.serverAddress = server.m_NetAdr.GetConnectionAddressString(); if (!string.IsNullOrEmpty(this._joinDsScreen._password.value)) { SteamClientDSConfig.password = SteamDSConfig.PasswordToHash(this._joinDsScreen._password.value); this._joinDsScreen._password.value = string.Empty; } else { SteamClientDSConfig.password = string.Empty; } if (!string.IsNullOrEmpty(this._joinDsScreen._adminPassword.value)) { SteamClientDSConfig.adminPassword = SteamDSConfig.PasswordToHash(this._joinDsScreen._adminPassword.value); this._joinDsScreen._adminPassword.value = string.Empty; } else { SteamClientDSConfig.adminPassword = string.Empty; } SteamClientDSConfig.EndPoint = UdpEndPoint.Parse(SteamClientDSConfig.serverAddress); GameSetup.SetInitType(InitTypes.Continue); UnityEngine.Object.Destroy(base.gameObject); SceneManager.LoadScene("SteamStartSceneDedicatedServer_Client"); }