This commit is contained in:
2026-11-10 20:31:33 +01:00
parent 2ef8e857e0
commit 8c24b112d4
20 changed files with 83 additions and 66 deletions
+2 -2
View File
@@ -770,8 +770,8 @@ void QSceneRenderer::drawUnitsOverlay(QPainter &painter, const QMatrix4x4 &vMatr
}
// Recharge bar below military units when recharging
if (unit->config.canAttack() && unit->isRecharging()) {
float rechargePercent = std::max(0.0f, std::min(1.0f, unit->rechargeTimer / unit->config.rechargeTime));
if (unit->isRecharging()) {
float rechargePercent = std::max(0.0f, std::min(1.0f, unit->rechargeTimer / unit->config.rechargeTicks));
QRectF recBg(headCenter.x() - 14.0f, headCenter.y() - R - 5.5f, 28.0f, 3.5f);
painter.setBrush(QColor(30, 30, 30, 220));
painter.setPen(Qt::NoPen);