diff --git a/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainVisual.cpp b/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainVisual.cpp index c76cdb1a23e..d05b3d123a0 100644 --- a/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainVisual.cpp +++ b/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainVisual.cpp @@ -606,11 +606,19 @@ Bool W3DTerrainVisual::load( AsciiString filename ) // apply the heightmap to the terrain render object #ifdef DO_SEISMIC_SIMULATIONS + if (TheGlobalData->m_renderAllTerrain) { + m_clientHeightMap->setDrawWidth(m_clientHeightMap->getXExtent()); + m_clientHeightMap->setDrawHeight(m_clientHeightMap->getYExtent()); + } m_terrainRenderObject->initHeightData( m_clientHeightMap->getDrawWidth(), m_clientHeightMap->getDrawHeight(), m_clientHeightMap, it); #else + if (TheGlobalData->m_renderAllTerrain) { + m_logicHeightMap->setDrawWidth(m_logicHeightMap->getXExtent()); + m_logicHeightMap->setDrawHeight(m_logicHeightMap->getYExtent()); + } m_terrainRenderObject->initHeightData( m_logicHeightMap->getDrawWidth(), m_logicHeightMap->getDrawHeight(), m_logicHeightMap, diff --git a/Generals/Code/GameEngine/Include/Common/GlobalData.h b/Generals/Code/GameEngine/Include/Common/GlobalData.h index d9d861d7e95..365ad894c95 100644 --- a/Generals/Code/GameEngine/Include/Common/GlobalData.h +++ b/Generals/Code/GameEngine/Include/Common/GlobalData.h @@ -119,7 +119,7 @@ class GlobalData : public SubsystemInterface // TheSuperHackers @feature helmutbuhler 11/04/2025 // Run game without graphics, input or audio. Bool m_headless; - + Bool m_renderAllTerrain; Bool m_windowed; Int m_xResolution; Int m_yResolution; diff --git a/Generals/Code/GameEngine/Source/Common/GlobalData.cpp b/Generals/Code/GameEngine/Source/Common/GlobalData.cpp index 446d64d797d..fbcde8287cf 100644 --- a/Generals/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/Generals/Code/GameEngine/Source/Common/GlobalData.cpp @@ -91,7 +91,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr; { "UseHalfHeightMap", INI::parseBool, nullptr, offsetof( GlobalData, m_useHalfHeightMap ) }, { "UserDataLeafName", INI::parseQuotedAsciiString, nullptr, offsetof( GlobalData, m_userDataLeafName ) }, - + { "RenderAllTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_renderAllTerrain ) }, { "DrawEntireTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_drawEntireTerrain ) }, { "TerrainLOD", INI::parseIndexList, TerrainLODNames, offsetof( GlobalData, m_terrainLOD ) }, { "TerrainLODTargetTimeMS", INI::parseInt, nullptr, offsetof( GlobalData, m_terrainLODTargetTimeMS ) }, @@ -427,7 +427,6 @@ GlobalData* GlobalData::m_theOriginal = nullptr; { "ShellMapName", INI::parseAsciiString,nullptr, offsetof( GlobalData, m_shellMapName ) }, { "ShellMapOn", INI::parseBool, nullptr, offsetof( GlobalData, m_shellMapOn ) }, { "PlayIntro", INI::parseBool, nullptr, offsetof( GlobalData, m_playIntro ) }, - { "FirewallBehavior", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallBehavior ) }, { "FirewallPortOverride", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortOverride ) }, { "FirewallPortAllocationDelta",INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortAllocationDelta) }, @@ -627,6 +626,7 @@ GlobalData::GlobalData() m_framesPerSecondLimit = 0; m_chipSetType = 0; m_headless = FALSE; + m_renderAllTerrain = FALSE; m_windowed = 0; m_xResolution = DEFAULT_DISPLAY_WIDTH; m_yResolution = DEFAULT_DISPLAY_HEIGHT; @@ -1225,6 +1225,7 @@ void GlobalData::parseGameDataDefinition( INI* ini ) TheWritableGlobalData->m_xResolution = xres; TheWritableGlobalData->m_yResolution = yres; + TheWritableGlobalData->m_renderAllTerrain = optionPref.getBool("RenderAllTerrain", TheWritableGlobalData->m_renderAllTerrain); } void GlobalData::parseCustomDefinition() diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h index 337477129cf..cdd35364630 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h @@ -120,7 +120,7 @@ class GlobalData : public SubsystemInterface // TheSuperHackers @feature helmutbuhler 11/04/2025 // Run game without graphics, input or audio. Bool m_headless; - + Bool m_renderAllTerrain; Bool m_windowed; Int m_xResolution; Int m_yResolution; diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp index e7e324c57aa..9293027d8b9 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp @@ -91,7 +91,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr; { "StretchTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_stretchTerrain ) }, { "UseHalfHeightMap", INI::parseBool, nullptr, offsetof( GlobalData, m_useHalfHeightMap ) }, - + { "RenderAllTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_renderAllTerrain ) }, { "DrawEntireTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_drawEntireTerrain ) }, { "TerrainLOD", INI::parseIndexList, TerrainLODNames, offsetof( GlobalData, m_terrainLOD ) }, { "TerrainLODTargetTimeMS", INI::parseInt, nullptr, offsetof( GlobalData, m_terrainLODTargetTimeMS ) }, @@ -427,7 +427,6 @@ GlobalData* GlobalData::m_theOriginal = nullptr; { "ShellMapName", INI::parseAsciiString,nullptr, offsetof( GlobalData, m_shellMapName ) }, { "ShellMapOn", INI::parseBool, nullptr, offsetof( GlobalData, m_shellMapOn ) }, { "PlayIntro", INI::parseBool, nullptr, offsetof( GlobalData, m_playIntro ) }, - { "FirewallBehavior", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallBehavior ) }, { "FirewallPortOverride", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortOverride ) }, { "FirewallPortAllocationDelta",INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortAllocationDelta) }, @@ -631,6 +630,7 @@ GlobalData::GlobalData() m_framesPerSecondLimit = 0; m_chipSetType = 0; m_headless = FALSE; + m_renderAllTerrain = FALSE; m_windowed = 0; m_xResolution = DEFAULT_DISPLAY_WIDTH; m_yResolution = DEFAULT_DISPLAY_HEIGHT; @@ -1245,6 +1245,7 @@ void GlobalData::parseGameDataDefinition( INI* ini ) TheWritableGlobalData->m_xResolution = xres; TheWritableGlobalData->m_yResolution = yres; + TheWritableGlobalData->m_renderAllTerrain = optionPref.getBool("RenderAllTerrain", TheWritableGlobalData->m_renderAllTerrain); } void GlobalData::parseCustomDefinition()