aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-06-03 11:48:04 -0400
committerGitHub <[email protected]>2017-06-03 11:48:04 -0400
commit4faeb54225919bab1692859b4fe9d9b65f3bedea (patch)
tree2ff98b9d969edb5ea67e439c833e9adee739b722 /ShiftOS_TheReturn
parentcc55af0c8b4d14053bfb46ec14c3e1887d375f7d (diff)
parent7fe5d790dc9d73056e86af8116ba4db9674fd612 (diff)
downloadshiftos_thereturn-4faeb54225919bab1692859b4fe9d9b65f3bedea.tar.gz
shiftos_thereturn-4faeb54225919bab1692859b4fe9d9b65f3bedea.tar.bz2
shiftos_thereturn-4faeb54225919bab1692859b4fe9d9b65f3bedea.zip
Merge pull request #125 from RogueAI42/master
fixed shiftorium
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 395db85..155f002 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -570,8 +570,15 @@ namespace ShiftOS.Engine
Console.Write("{SE_SAVING}... ");
if (SaveSystem.CurrentSave != null)
{
- Utils.WriteAllText(Paths.GetPath("user.dat"), CurrentSave.UniteAuthToken);
- ServerManager.SendMessage("mud_save", JsonConvert.SerializeObject(CurrentSave, Formatting.Indented));
+ Utils.WriteAllText(Paths.GetPath("user.dat"), CurrentSave.UniteAuthToken);
+ var serialisedSaveFile = JsonConvert.SerializeObject(CurrentSave, Formatting.Indented);
+ new Thread(() =>
+ {
+ // please don't do networking on the main thread if you're just going to
+ // discard the response, it's extremely slow
+ ServerManager.SendMessage("mud_save", serialisedSaveFile);
+ })
+ { IsBackground = false }.Start();
}
if (!Shiftorium.Silent)
Console.WriteLine(" ...{DONE}.");