From 0a6b56179e7be71d33bcd284734142d7b03ee3e4 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sat, 5 Feb 2022 19:01:53 -0800 Subject: [PATCH] update QSBNetworkManager --- EpicOnlineTransport/EOSSDKComponent.cs | 4 ++-- QSB/QSBNetworkManager.cs | 25 +++++++++++++++++-------- QSB/Utility/DebugSettings.cs | 3 --- QSB/debugsettings.json.example | 1 - 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/EpicOnlineTransport/EOSSDKComponent.cs b/EpicOnlineTransport/EOSSDKComponent.cs index 93162f8c..edf8ce61 100644 --- a/EpicOnlineTransport/EOSSDKComponent.cs +++ b/EpicOnlineTransport/EOSSDKComponent.cs @@ -21,7 +21,7 @@ namespace EpicTransport { // Unity Inspector shown variables [SerializeField] - private EosApiKey apiKeys; + public EosApiKey apiKeys; [Header("User Login")] public bool authInterfaceLogin = false; @@ -132,7 +132,7 @@ namespace EpicTransport { } protected static EOSSDKComponent instance; - protected static EOSSDKComponent Instance { + public static EOSSDKComponent Instance { get { if (instance == null) { return new GameObject("EOSSDKComponent").AddComponent(); diff --git a/QSB/QSBNetworkManager.cs b/QSB/QSBNetworkManager.cs index 521f3fda..a8d825ed 100644 --- a/QSB/QSBNetworkManager.cs +++ b/QSB/QSBNetworkManager.cs @@ -1,5 +1,5 @@ -using Mirror; -using Mirror.FizzySteam; +using EpicTransport; +using Mirror; using OWML.Common; using OWML.Utils; using QSB.Anglerfish.TransformSync; @@ -65,12 +65,21 @@ namespace QSB } else { - var fizzy = gameObject.AddComponent(); - fizzy.SteamAppID = QSBCore.DebugSettings.OverrideAppId == -1 - ? _defaultSteamAppID.ToString() - : QSBCore.DebugSettings.OverrideAppId.ToString(); - fizzy.SetTransportError = error => _lastTransportError = error; - transport = fizzy; + var eosTransport = gameObject.AddComponent(); + EOSSDKComponent.Instance.apiKeys = new EosApiKey + { + name = null, + hideFlags = HideFlags.None, + epicProductName = null, + epicProductVersion = null, + epicProductId = null, + epicSandboxId = null, + epicDeploymentId = null, + epicClientId = null, + epicClientSecret = null + }; // todo + // todo eosTransport.SetTransportError = error => _lastTransportError = error; + transport = eosTransport; } gameObject.SetActive(true); diff --git a/QSB/Utility/DebugSettings.cs b/QSB/Utility/DebugSettings.cs index 1707e907..7b4e0c4b 100644 --- a/QSB/Utility/DebugSettings.cs +++ b/QSB/Utility/DebugSettings.cs @@ -7,9 +7,6 @@ namespace QSB.Utility [JsonProperty("useKcpTransport")] public bool UseKcpTransport; - [JsonProperty("overrideAppId")] - public int OverrideAppId = -1; - [JsonProperty("dumpWorldObjects")] public bool DumpWorldObjects; diff --git a/QSB/debugsettings.json.example b/QSB/debugsettings.json.example index e33a03f3..58a8dfa7 100644 --- a/QSB/debugsettings.json.example +++ b/QSB/debugsettings.json.example @@ -1,6 +1,5 @@ { "useKcpTransport": false, - "overrideAppId": -1, "dumpWorldObjects": false, "playerIdInLogs": false, "debugMode": false,