diff --git a/src/client/creature.cpp b/src/client/creature.cpp index def4c5599b..4074e96ec1 100644 --- a/src/client/creature.cpp +++ b/src/client/creature.cpp @@ -168,11 +168,10 @@ void Creature::drawInformation(const MapPosInfo& mapRect, const Point& dest, boo } // distance them - uint8_t offset = 12; - if (isLocalPlayer()) - offset *= 2; - - offset *= mapRect.scaleFactor; + uint8_t offset = 12 * mapRect.scaleFactor; + if (isLocalPlayer()) { + offset *= 2 * mapRect.scaleFactor; + } if (textRect.top() == parentRect.top()) backgroundRect.moveTop(textRect.top() + offset); diff --git a/src/client/mapview.cpp b/src/client/mapview.cpp index a99593b046..3d6fdb4dfa 100644 --- a/src/client/mapview.cpp +++ b/src/client/mapview.cpp @@ -403,7 +403,6 @@ void MapView::updateRect(const Rect& rect) { m_posInfo.drawOffset = m_posInfo.srcRect.topLeft(); m_posInfo.horizontalStretchFactor = rect.width() / static_cast(m_posInfo.srcRect.width()); m_posInfo.verticalStretchFactor = rect.height() / static_cast(m_posInfo.srcRect.height()); - m_posInfo.scaleFactor = g_drawPool.getScaleFactor(); const auto& mousePos = getPosition(g_window.getMousePosition()); if (mousePos != m_mousePosition) @@ -427,6 +426,8 @@ void MapView::updateGeometry(const Size& visibleDimension) m_pool->setScaleFactor(scaleFactor); + m_posInfo.scaleFactor = scaleFactor; + const uint16_t tileSize = g_gameConfig.getSpriteSize() * m_pool->getScaleFactor(); const auto& drawDimension = visibleDimension + 3; const auto& bufferSize = drawDimension * tileSize;