Skip to content

Commit ec69fae

Browse files
author
Ibra
committed
bugfix: Clamp observer camera reset zoom level
1 parent b7cfeaf commit ec69fae

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
@@ -2281,7 +2281,8 @@ void W3DView::setHeightAboveGround(Real z)
22812281
#if defined(GENERALS_ONLINE)
22822282
if (ThePlayerList && ThePlayerList->getLocalPlayer() && ThePlayerList->getLocalPlayer()->isPlayerObserver())
22832283
{
2284-
m_maxHeightAboveGround = (float)GENERALS_ONLINE_MAX_LOBBY_CAMERA_ZOOM;
2284+
const Real cameraHeightForReset = 500.0f;
2285+
m_maxHeightAboveGround = z > cameraHeightForReset ? (float)GENERALS_ONLINE_MAX_LOBBY_CAMERA_ZOOM : cameraHeightForReset;
22852286
}
22862287
#endif
22872288

0 commit comments

Comments
 (0)