Unstable 0.13.3.11

This commit is contained in:
Markus Isberg
2021-04-28 16:10:00 +03:00
parent bf743f1e99
commit 3f324b14e8
18 changed files with 60 additions and 53 deletions
@@ -442,7 +442,7 @@ namespace Barotrauma
Character.AnimController.InWater ||
Character.AnimController.HeadInWater ||
Character.CurrentHull == null ||
Character.Submarine.TeamID != Character.TeamID ||
Character.Submarine?.TeamID != Character.TeamID ||
ObjectiveManager.IsCurrentObjective<AIObjectiveFindSafety>() ||
ObjectiveManager.CurrentOrder is AIObjectiveGoTo goTo && goTo.Target == Character || // wait order
ObjectiveManager.CurrentObjective.GetSubObjectivesRecursive(true).Any(o => o.KeepDivingGearOn);
@@ -276,7 +276,16 @@ namespace Barotrauma
{
SteamWorkshopId = SteamManager.GetWorkshopItemIDFromUrl(workshopUrl);
}
GameVersion = new Version(doc.Root.GetAttributeString("gameversion", "0.0.0.0"));
string versionStr = doc.Root.GetAttributeString("gameversion", "0.0.0.0");
try
{
GameVersion = new Version(versionStr);
}
catch
{
DebugConsole.ThrowError($"Invalid version number in content package \"{Name}\" ({versionStr}).");
GameVersion = GameMain.Version;
}
if (doc.Root.Attribute("installtime") != null)
{
InstallTime = ToolBox.Epoch.ToDateTime(doc.Root.GetAttributeUInt("installtime", 0));
@@ -914,7 +914,6 @@ namespace Barotrauma.Networking
{
if (!HasPassword) return true;
byte[] saltedPw = SaltPassword(Encoding.UTF8.GetBytes(password), salt);
DebugConsole.NewMessage(ToolBox.ByteArrayToString(input) + " " + ToolBox.ByteArrayToString(saltedPw));
if (input.Length != saltedPw.Length) return false;
for (int i = 0; i < input.Length; i++)
{