From f8eb6202c07045a3b6158406cf48031208fc74b5 Mon Sep 17 00:00:00 2001 From: Mercury233 Date: Fri, 10 Jul 2026 11:54:59 +0800 Subject: [PATCH] fix start_lp=1 in tag duel --- gframe/drawing.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gframe/drawing.cpp b/gframe/drawing.cpp index 1accb2eec7..53cbd6caae 100644 --- a/gframe/drawing.cpp +++ b/gframe/drawing.cpp @@ -1,3 +1,4 @@ +#include #include "game.h" #ifdef __APPLE__ #include @@ -587,9 +588,9 @@ void Game::DrawMisc() { driver->draw2DRectangle(0xa0000000, Resize(689, 8, 992, 51)); driver->draw2DRectangleOutline(Resize(689, 8, 992, 51), 0xffff8080); } - if(dInfo.start_lp) { + if(dInfo.start_lp > 0) { constexpr float maxBarWidth = 292.0f; - auto maxLP = dInfo.isTag ? dInfo.start_lp / 2 : dInfo.start_lp; + auto maxLP = dInfo.isTag ? std::max(dInfo.start_lp / 2, 1) : dInfo.start_lp; if(dInfo.lp[0] > maxLP) { auto layerCount = dInfo.lp[0] / maxLP; auto partialLP = dInfo.lp[0] % maxLP;