fix viewport height
This commit is contained in:
@@ -243,7 +243,8 @@ void GameWorldView::paintGL()
|
||||
|
||||
float GameWorldView::tilePx() const
|
||||
{
|
||||
return 20.0f;
|
||||
if (m_config->world.heightTiles <= 0) { return 1.0f; }
|
||||
return static_cast<float>(height()) / static_cast<float>(m_config->world.heightTiles);
|
||||
}
|
||||
|
||||
float GameWorldView::viewportWidthTiles() const
|
||||
|
||||
Reference in New Issue
Block a user