added a bool to the world save mechanism. This should prevent it from saving 3 times at once. Hopefully thats what was causing server crashes

This commit is contained in:
Zack Piispanen 2012-01-15 17:46:38 -05:00
parent 95946ba060
commit 38011f6364
2 changed files with 13 additions and 6 deletions

View file

@ -29,6 +29,8 @@ namespace TShockAPI
{
public class Utils
{
public static bool saving = false;
public Utils()
{
}
@ -110,9 +112,11 @@ namespace TShockAPI
/// </summary>
public void SaveWorld()
{
WorldGen.realsaveWorld();
Broadcast("World saved.", Color.Yellow);
Log.Info(string.Format("World saved at ({0})", Main.worldPathName));
saving = true;
WorldGen.realsaveWorld();
Broadcast("World saved.", Color.Yellow);
Log.Info(string.Format("World saved at ({0})", Main.worldPathName));
saving = false;
}
/// <summary>