(a843b19d4) Optimize distance checks.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:23:55 +03:00
parent 52d25694ed
commit 77f1d0ea8e
9 changed files with 187 additions and 270 deletions
@@ -1332,6 +1332,10 @@ namespace Barotrauma
{
ApplyStatusEffects(!waterProof && inWater ? ActionType.InWater : ActionType.NotInWater, deltaTime);
}
if (!broken)
{
ApplyStatusEffects(!waterProof && inWater ? ActionType.InWater : ActionType.NotInWater, deltaTime);
}
ApplyStatusEffects(!waterProof && inWater ? ActionType.InWater : ActionType.NotInWater, deltaTime);
if (body == null || !body.Enabled || !inWater || ParentInventory != null || Removed) { return; }