Skip to content

Commit d706084

Browse files
authored
fix start_lp=1 in tag duel (#3137)
1 parent a23e1b6 commit d706084

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gframe/drawing.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <algorithm>
12
#include "game.h"
23
#ifdef __APPLE__
34
#include <OpenGL/gl.h>
@@ -587,9 +588,9 @@ void Game::DrawMisc() {
587588
driver->draw2DRectangle(0xa0000000, Resize(689, 8, 992, 51));
588589
driver->draw2DRectangleOutline(Resize(689, 8, 992, 51), 0xffff8080);
589590
}
590-
if(dInfo.start_lp) {
591+
if(dInfo.start_lp > 0) {
591592
constexpr float maxBarWidth = 292.0f;
592-
auto maxLP = dInfo.isTag ? dInfo.start_lp / 2 : dInfo.start_lp;
593+
auto maxLP = dInfo.isTag ? std::max(dInfo.start_lp / 2, 1) : dInfo.start_lp;
593594
if(dInfo.lp[0] > maxLP) {
594595
auto layerCount = dInfo.lp[0] / maxLP;
595596
auto partialLP = dInfo.lp[0] % maxLP;

0 commit comments

Comments
 (0)