(ae643deeb) Added alive checks to a couple of diving gear status effects (don't consume tanks when dead)
This commit is contained in:
@@ -75,7 +75,10 @@ namespace Barotrauma
|
||||
};
|
||||
|
||||
var h = new ConvexHull(verts, Color.Black, this);
|
||||
h.Rotate(position, rotation);
|
||||
if (Math.Abs(rotation) > 0.001f)
|
||||
{
|
||||
h.Rotate(position, rotation);
|
||||
}
|
||||
convexHulls.Add(h);
|
||||
}
|
||||
|
||||
@@ -292,8 +295,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (damageEffect != null)
|
||||
{
|
||||
float newCutoff = Sections[i].damage > 0 ?
|
||||
MathHelper.Lerp(0.2f, 0.65f, Sections[i].damage / Prefab.Health) : 0.0f;
|
||||
float newCutoff = MathHelper.Lerp(0.0f, 0.65f, Sections[i].damage / Prefab.Health);
|
||||
|
||||
if (Math.Abs(newCutoff - Submarine.DamageEffectCutoff) > 0.01f || color != Submarine.DamageEffectColor)
|
||||
{
|
||||
@@ -360,6 +362,7 @@ namespace Barotrauma
|
||||
-Bodies[i].Rotation, Color.White);
|
||||
}
|
||||
}
|
||||
AiTarget?.Draw(spriteBatch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user