(2ffcd0a06) Retry writing files in SaveUtil.DecompressFile up to 4 times (in case the file is being used by another process), fixed DecompressFiletoStream "retrying" 4 times even if the first try succeeds

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:44:15 +03:00
parent ec7e45e021
commit 7ae2b2f387
15 changed files with 256 additions and 256 deletions
@@ -13,6 +13,8 @@ namespace Barotrauma
private AIObjectiveFindDivingGear findDivingGear;
private AIObjectiveFindDivingGear findDivingGear;
private AIObjectiveFindDivingGear findDivingGear;
private Vector2 targetPos;
private bool repeat;
@@ -85,6 +87,8 @@ namespace Barotrauma
public bool FollowControlledCharacter;
public bool FollowControlledCharacter;
public AIObjectiveGoTo(Entity target, Character character, AIObjectiveManager objectiveManager, bool repeat = false, bool getDivingGearIfNeeded = true, float priorityModifier = 1)
: base (character, objectiveManager, priorityModifier)
{
@@ -217,7 +221,7 @@ namespace Barotrauma
private void CalculateCloseEnough()
{
float interactionDistance = Target is Item i ? ConvertUnits.ToSimUnits(i.InteractDistance * 0.9f) : 0;
float interactionDistance = Target is Item i ? ConvertUnits.ToSimUnits(i.InteractDistance) : 0;
CloseEnough = Math.Max(interactionDistance, CloseEnough);
}