diff --git a/src/game/client/neo/ui/neo_hud_childelement.cpp b/src/game/client/neo/ui/neo_hud_childelement.cpp index 850b3014a..dc6edfbe8 100644 --- a/src/game/client/neo/ui/neo_hud_childelement.cpp +++ b/src/game/client/neo/ui/neo_hud_childelement.cpp @@ -59,13 +59,19 @@ CNEOHud_ChildElement::XYHudPos CNEOHud_ChildElement::DrawNeoHudRoundedCommon( const int x0, const int y0, const int x1, const int y1, Color color, bool topLeft, bool topRight, bool bottomLeft, bool bottomRight) const { - const XYHudPos p{ + XYHudPos p{ .x0w = x0 + m_rounded_width, .x1w = x1 - m_rounded_width, .y0h = y0 + m_rounded_height, .y1h = y1 - m_rounded_height, }; + if (p.y1h < p.y0h) + p.y1h = p.y0h = y0 + (0.5 * (y1 - y0)); + + if (p.x1w < p.x0w) + p.x1w = p.x0w = x0 + (0.5 * (x1 - x0)); + surface()->DrawSetColor(color); // Rounded corner pieces