timeoutfix: original source and diff from reddit
from: https://www.reddit.com/r/spaceengineers/comments/f7ul3s/fix_for_server_is_not_responding_error/ by rexxar
This commit is contained in:
46
joinfix.diff
Normal file
46
joinfix.diff
Normal file
@@ -0,0 +1,46 @@
|
||||
Index: Sources/Sandbox.Game/Engine/Networking/MyWorkshop.cs
|
||||
===================================================================
|
||||
--- Sources/Sandbox.Game/Engine/Networking/MyWorkshop.cs (revision 124917)
|
||||
+++ Sources/Sandbox.Game/Engine/Networking/MyWorkshop.cs (working copy)
|
||||
@@ -196,6 +196,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ public static bool DownloadScreenVisible
|
||||
+ {
|
||||
+ get { return m_downloadScreen?.Visible ?? false; }
|
||||
+ }
|
||||
+
|
||||
private static MyGuiScreenMessageBox m_downloadScreen;
|
||||
private static DownloadModsResult m_downloadResult;
|
||||
|
||||
Index: Sources/Sandbox.Game/Game/Screens/MyJoinGameHelper.cs
|
||||
===================================================================
|
||||
--- Sources/Sandbox.Game/Game/Screens/MyJoinGameHelper.cs (revision 124917)
|
||||
+++ Sources/Sandbox.Game/Game/Screens/MyJoinGameHelper.cs (working copy)
|
||||
@@ -247,16 +247,23 @@
|
||||
}
|
||||
|
||||
bool isTop = MyScreenManager.IsScreenOnTop(progress);
|
||||
- if (isTop && !worldRequestTime.IsRunning)
|
||||
+ bool visible = MyWorkshop.DownloadScreenVisible;
|
||||
+
|
||||
+ if (!visible && isTop && !worldRequestTime.IsRunning)
|
||||
{
|
||||
worldRequestTime.Start();
|
||||
}
|
||||
- else if (!isTop && worldRequestTime.IsRunning)
|
||||
+ else if (visible || !isTop && worldRequestTime.IsRunning)
|
||||
{
|
||||
worldRequestTime.Stop();
|
||||
}
|
||||
|
||||
+ if (visible && progress.Visible)
|
||||
+ progress.HideScreen();
|
||||
+ else if (!visible && !progress.Visible)
|
||||
+ progress.UnhideScreen();
|
||||
|
||||
+
|
||||
if (worldRequestTime.IsRunning && worldRequestTime.Elapsed.TotalSeconds > worldRequestTimeout)
|
||||
{
|
||||
MyLog.Default.WriteLine("World requested - failed, server changed");
|
Reference in New Issue
Block a user