diff --git a/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalSelectable.java b/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalSelectable.java index a935741..316f751 100644 --- a/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalSelectable.java +++ b/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalSelectable.java @@ -278,7 +278,7 @@ public void updateHealth(float pct) { this.healthPct = pct; - int texture_index = (int) (HEALTH_QUANTA * pct); + int texture_index = Math.min((int) (HEALTH_QUANTA * pct), HEALTH_QUANTA -1); standardTexture = nodeTypeToStandardColorizedTextures.get(this.selectableType)[texture_index]; hoveredTexture = nodeTypeToHoveredColorizedTextures.get(this.selectableType)[texture_index];