(f27ee6807) Changed to only show damage indication when the section is damaged

This commit is contained in:
Joonas Rikkonen
2019-04-17 12:42:53 +03:00
parent 1615e2f6aa
commit ee2326db63
@@ -327,9 +327,12 @@ namespace Barotrauma
{
for (int i = 0; i < SectionCount; i++)
{
var textPos = SectionPosition(i, true);
textPos.Y = -textPos.Y;
GUI.DrawString(spriteBatch, textPos, "Damage: " + (int)((GetSection(i).damage / Health) * 100f) + "%", Color.Yellow);
if (GetSection(i).damage > 0)
{
var textPos = SectionPosition(i, true);
textPos.Y = -textPos.Y;
GUI.DrawString(spriteBatch, textPos, "Damage: " + (int)((GetSection(i).damage / Health) * 100f) + "%", Color.Yellow);
}
}
}