Recreated controls after load to fix weird paint issues and possibly other issues
This commit is contained in:
@@ -166,15 +166,8 @@ namespace SeamlessClientPlugin
|
||||
//TryShow("Sending PluginVersion to Server!");
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
|
||||
ClientMessage PingServer = new ClientMessage(ClientMessageType.FirstJoin);
|
||||
MyAPIGateway.Multiplayer?.SendMessageToServer(SeamlessClientNetID, Utilities.Utility.Serialize(PingServer));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -256,14 +249,10 @@ namespace SeamlessClientPlugin
|
||||
try
|
||||
{
|
||||
TryShow("Restarting Client!");
|
||||
|
||||
string exe = Assembly.GetEntryAssembly().Location;
|
||||
|
||||
|
||||
Process currentProcess = Process.GetCurrentProcess();
|
||||
|
||||
string[] CommandArgs = Environment.GetCommandLineArgs();
|
||||
|
||||
string NewCommandLine = "";
|
||||
for(int i = 1; i < CommandArgs.Length; i++)
|
||||
{
|
||||
@@ -271,10 +260,7 @@ namespace SeamlessClientPlugin
|
||||
}
|
||||
|
||||
TryShow(NewCommandLine);
|
||||
|
||||
Process.Start(exe, NewCommandLine);
|
||||
|
||||
|
||||
currentProcess.Kill();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@@ -54,6 +54,8 @@ namespace SeamlessClientPlugin.SeamlessTransfer
|
||||
private static readonly Type MySessionType = Type.GetType("Sandbox.Game.World.MySession, Sandbox.Game");
|
||||
private static readonly Type VirtualClientsType = Type.GetType("Sandbox.Engine.Multiplayer.MyVirtualClients, Sandbox.Game");
|
||||
private static readonly Type GUIScreenChat = Type.GetType("Sandbox.Game.Gui.MyGuiScreenChat, Sandbox.Game");
|
||||
private static readonly Type GUIScreenDPAD = Type.GetType("Sandbox.Game.Screens.Helpers.MyGuiControlDPad, Sandbox.Game");
|
||||
|
||||
|
||||
private static Harmony Patcher = new Harmony("SeamlessClientReUnload");
|
||||
private static MyGameServerItem Server;
|
||||
@@ -502,6 +504,10 @@ namespace SeamlessClientPlugin.SeamlessTransfer
|
||||
SeamlessClient.TryShow("OnlinePlayers: " + MySession.Static.Players.GetOnlinePlayers().Count);
|
||||
SeamlessClient.TryShow("Loading Complete!");
|
||||
|
||||
|
||||
//Recreate all controls... Will fix weird gui/paint/crap
|
||||
MyGuiScreenHudSpace.Static.RecreateControls(true);
|
||||
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user