Implemented SaveWorldOnCrash

This commit is contained in:
high 2011-08-17 17:19:02 -04:00
parent aecf61afcf
commit 1fa5fdcf04

View file

@ -250,7 +250,7 @@ namespace TShockAPI
if (e.IsTerminating) if (e.IsTerminating)
{ {
if (Main.worldPathName != null) if (Main.worldPathName != null && Config.SaveWorldOnCrash)
{ {
Main.worldPathName += ".crash"; Main.worldPathName += ".crash";
WorldGen.saveWorld(); WorldGen.saveWorld();
@ -669,7 +669,7 @@ namespace TShockAPI
} }
catch (Exception ex) catch (Exception ex)
{ {
Log.Error(ex.ToString()); Log.Warn(ex.ToString());
} }
return false; return false;
} }