diff options
| author | RogueAI42 <[email protected]> | 2017-06-04 01:29:21 +1000 |
|---|---|---|
| committer | RogueAI42 <[email protected]> | 2017-06-04 01:29:21 +1000 |
| commit | 7fe5d790dc9d73056e86af8116ba4db9674fd612 (patch) | |
| tree | 2ff98b9d969edb5ea67e439c833e9adee739b722 /ShiftOS_TheReturn/SaveSystem.cs | |
| parent | cc55af0c8b4d14053bfb46ec14c3e1887d375f7d (diff) | |
| download | shiftos_thereturn-7fe5d790dc9d73056e86af8116ba4db9674fd612.tar.gz shiftos_thereturn-7fe5d790dc9d73056e86af8116ba4db9674fd612.tar.bz2 shiftos_thereturn-7fe5d790dc9d73056e86af8116ba4db9674fd612.zip | |
fixed shiftorium
just in time for chrimbus
Diffstat (limited to 'ShiftOS_TheReturn/SaveSystem.cs')
| -rw-r--r-- | ShiftOS_TheReturn/SaveSystem.cs | 11 |
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}."); |
