v0.11.0.9

This commit is contained in:
Joonas Rikkonen
2020-12-09 16:34:16 +02:00
parent bbf06f0984
commit f433a7ba10
325 changed files with 13947 additions and 3652 deletions
@@ -30,6 +30,8 @@ namespace Barotrauma
public bool followControlledCharacter;
public bool mimic;
public float extraDistanceWhileSwimming;
public float extraDistanceOutsideSub;
private float _closeEnough = 50;
private readonly float minDistance = 50;
/// <summary>
@@ -37,7 +39,19 @@ namespace Barotrauma
/// </summary>
public float CloseEnough
{
get { return _closeEnough; }
get
{
float dist = _closeEnough;
if (character.AnimController.InWater)
{
dist += extraDistanceWhileSwimming;
}
if (character.CurrentHull == null)
{
dist += extraDistanceOutsideSub;
}
return dist;
}
set
{
_closeEnough = Math.Max(minDistance, value);