Skip to content

Commit 1eceff5

Browse files
authored
tweak(input): Allow camera zoom during game pause (#1446)
1 parent c2db217 commit 1eceff5

File tree

2 files changed

+4
-2
lines changed
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient
  • Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient

2 files changed

+4
-2
lines changed

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,10 @@ void W3DView::update(void)
11741174
* underground or higher than the max allowed height. When the camera is at rest (not
11751175
* scrolling), the zoom will move toward matching the desired height.
11761176
*/
1177+
// TheSuperHackers @tweak Can now also zoom when the game is paused.
11771178
m_terrainHeightUnderCamera = getHeightAroundPos(m_pos.x, m_pos.y);
11781179
m_currentHeightAboveGround = m_cameraOffset.z * m_zoom - m_terrainHeightUnderCamera;
1179-
if (TheTerrainLogic && TheGlobalData && TheInGameUI && m_okToAdjustHeight && !TheGameLogic->isGamePaused())
1180+
if (TheTerrainLogic && TheGlobalData && TheInGameUI && m_okToAdjustHeight)
11801181
{
11811182
Real desiredHeight = (m_terrainHeightUnderCamera + m_heightAboveGround);
11821183
Real desiredZoom = desiredHeight / m_cameraOffset.z;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,9 +1326,10 @@ void W3DView::update(void)
13261326
* underground or higher than the max allowed height. When the camera is at rest (not
13271327
* scrolling), the zoom will move toward matching the desired height.
13281328
*/
1329+
// TheSuperHackers @tweak Can now also zoom when the game is paused.
13291330
m_terrainHeightUnderCamera = getHeightAroundPos(m_pos.x, m_pos.y);
13301331
m_currentHeightAboveGround = m_cameraOffset.z * m_zoom - m_terrainHeightUnderCamera;
1331-
if (TheTerrainLogic && TheGlobalData && TheInGameUI && m_okToAdjustHeight && !TheGameLogic->isGamePaused())
1332+
if (TheTerrainLogic && TheGlobalData && TheInGameUI && m_okToAdjustHeight)
13321333
{
13331334
Real desiredHeight = (m_terrainHeightUnderCamera + m_heightAboveGround);
13341335
Real desiredZoom = desiredHeight / m_cameraOffset.z;

0 commit comments

Comments
 (0)