From ee2326db63908f8d0f1e7aa2ca42790a126d9195 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 17 Apr 2019 12:42:53 +0300 Subject: [PATCH] (f27ee6807) Changed to only show damage indication when the section is damaged --- Barotrauma/BarotraumaClient/Source/Map/Structure.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Map/Structure.cs b/Barotrauma/BarotraumaClient/Source/Map/Structure.cs index f5739d49e..b3e69d226 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/Structure.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/Structure.cs @@ -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); + } } }