Skip to content

Commit 52f7de7

Browse files
committed
fix(view): Increase the world height map draw area for wide aspect ratios
1 parent 8f1b647 commit 52f7de7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/WorldHeightMap.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
#include "W3DDevice/GameClient/TerrainTex.h"
5353
#include "W3DDevice/GameClient/W3DShadow.h"
5454

55+
#include "GameClient/view.h"
56+
5557
#include "Common/file.h"
5658

5759

@@ -534,6 +536,19 @@ WorldHeightMap::WorldHeightMap(ChunkInputStream *pStrm, Bool logicalDataOnly):
534536
m_drawWidthX=m_width;
535537
m_drawHeightY=m_height;
536538
}
539+
else {
540+
//TheSuperHacker @bugfix Mauller 23/10/2025 Increase the terrain draw area for wide aspect ratios
541+
Real baseAspectRatio = (Real)DEFAULT_DISPLAY_WIDTH / (Real)DEFAULT_DISPLAY_HEIGHT;
542+
Real currentAspectRatio = (Real)TheTacticalView->getWidth() / (Real)TheTacticalView->getHeight();
543+
constexpr Real drawAreaScaleFactor = 1.5f;
544+
545+
if (currentAspectRatio > baseAspectRatio)
546+
{
547+
m_drawWidthX *= drawAreaScaleFactor;
548+
m_drawHeightY *= drawAreaScaleFactor;
549+
}
550+
}
551+
537552
if (m_drawWidthX > m_width) {
538553
m_drawWidthX = m_width;
539554
}

0 commit comments

Comments
 (0)