Skip to content

Commit 18c0308

Browse files
authored
Merge pull request #524 from MrS-ibra/bugfix/obs-camera-reset
bugfix: Clamp observer camera reset zoom level
2 parents 8756845 + ec69fae commit 18c0308

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • Core/GameEngineDevice/Source/W3DDevice/GameClient

Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2284,7 +2284,8 @@ void W3DView::setHeightAboveGround(Real z)
22842284
#if defined(GENERALS_ONLINE)
22852285
if (ThePlayerList && ThePlayerList->getLocalPlayer() && ThePlayerList->getLocalPlayer()->isPlayerObserver())
22862286
{
2287-
m_maxHeightAboveGround = (float)GENERALS_ONLINE_MAX_LOBBY_CAMERA_ZOOM;
2287+
const Real cameraHeightForReset = 500.0f;
2288+
m_maxHeightAboveGround = z > cameraHeightForReset ? (float)GENERALS_ONLINE_MAX_LOBBY_CAMERA_ZOOM : cameraHeightForReset;
22882289
}
22892290
#endif
22902291

0 commit comments

Comments
 (0)