diff --git a/XLMultiplayer/Info.json b/XLMultiplayer/Info.json index 1f38d03..eaadacd 100644 --- a/XLMultiplayer/Info.json +++ b/XLMultiplayer/Info.json @@ -2,8 +2,7 @@ "Id": "XLMultiplayer", "DisplayName": "Silents Multiplayer Mod", "Author": "Silentbaws", - "Version": "0.10.2", - "GameVersion": "0.3.0", + "Version": "0.10.3", "ManagerVersion": "0.22.6", "Requirements": [ ], "AssemblyName": "XLMultiplayer.dll", diff --git a/XLMultiplayer/MultiplayerController.cs b/XLMultiplayer/MultiplayerController.cs index 597c26d..2f2b7ed 100644 --- a/XLMultiplayer/MultiplayerController.cs +++ b/XLMultiplayer/MultiplayerController.cs @@ -24,10 +24,6 @@ using UnityEngine.Networking; using Valve.Sockets; -// TODO: v0.10.0 - -// TODO: Console player list - // TODO: game of skate.... maybe? // TODO: Make replays save audio @@ -35,7 +31,6 @@ // TODO: Redo the multiplayer texture system // -> Send paths for non-custom gear - namespace XLMultiplayer { public enum OpCode : byte { Connect = 0, @@ -445,7 +440,7 @@ public IEnumerator LoadMap(string path) { //Load map with path LevelSelectionController levelSelectionController = GameStateMachine.Instance.LevelSelectionObject.GetComponentInChildren(); - IndexPath targetIndex = Traverse.Create(levelSelectionController).Method("GetIndexForLevel", target).GetValue(); + IndexPath targetIndex = GetIndexForLevel(target); Traverse.Create(levelSelectionController).Method("OnLevelHighlighted", targetIndex).GetValue(); string texturePath = Path.ChangeExtension(target.path, "png"); @@ -469,6 +464,30 @@ public IEnumerator LoadMap(string path) { yield break; } + + private IndexPath GetIndexForLevel(LevelInfo level) { + if (level == null) { + return new IndexPath(new int[2]); + } + int num = LevelManager.Instance.Levels.IndexOf(level); + if (num >= 0) { + return new IndexPath(new int[] + { + 0, + num + }); + } + num = LevelManager.Instance.CustomLevels.IndexOf(level); + if (num >= 0) { + return new IndexPath(new int[] + { + 1, + num + }); + } + return new IndexPath(new int[2]); + } + public void Update() { FrameWatch.Restart(); diff --git a/XLMultiplayerServer/Server.cs b/XLMultiplayerServer/Server.cs index 9a41aca..915afbe 100644 --- a/XLMultiplayerServer/Server.cs +++ b/XLMultiplayerServer/Server.cs @@ -45,7 +45,7 @@ public enum OpCode : byte { public class Server { // TODO: Update version number with versions - private string VERSION_NUMBER = "0.10.2"; + private string VERSION_NUMBER = "0.10.3"; public LogMessage LogMessageCallback; public LogChatMessage LogChatMessageCallback;