Networking bugfixes & optimization
This commit is contained in:
@@ -17,7 +17,9 @@ namespace Subsurface
|
||||
|
||||
public static float Round(float value, float div)
|
||||
{
|
||||
return (float)Math.Floor(value / div) * div;
|
||||
return (value < 0.0f) ?
|
||||
(float)Math.Ceiling(value / div) * div :
|
||||
(float)Math.Floor(value / div) * div;
|
||||
}
|
||||
|
||||
public static float VectorToAngle(Vector2 vector)
|
||||
|
||||
@@ -55,11 +55,16 @@ namespace Subsurface
|
||||
{
|
||||
DebugConsole.ThrowError("Error saving gamesession", e);
|
||||
}
|
||||
//Game1.GameSession.crewManager.Save(directory+"\\crew.xml");
|
||||
|
||||
try
|
||||
{
|
||||
CompressDirectory(tempPath, fileName+".save", null);
|
||||
}
|
||||
|
||||
CompressDirectory(tempPath, fileName+".save", null);
|
||||
|
||||
//Directory.Delete(tempPath, true);
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError("Error compressing save file", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadGame(string fileName)
|
||||
|
||||
Reference in New Issue
Block a user