Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,8 @@ void W3DView::update(void)
// if scrolling, only adjust if we're too close or too far
if (m_scrollAmount.length() < m_scrollAmountCutoff || (m_currentHeightAboveGround < m_minHeightAboveGround) || (TheGlobalData->m_enforceMaxCameraHeight && m_currentHeightAboveGround > m_maxHeightAboveGround))
{
Real zoomAdj = (desiredZoom - m_zoom) * TheGlobalData->m_cameraAdjustSpeed * TheGameEngine->getActualLogicTimeScaleOverFpsRatio();
const Real fpsRatio = (Real)BaseFps / TheGameEngine->getUpdateFps();
const Real zoomAdj = (desiredZoom - m_zoom) * TheGlobalData->m_cameraAdjustSpeed * fpsRatio;
if (fabs(zoomAdj) >= 0.0001f) // only do positive
{
m_zoom += zoomAdj;
Expand All @@ -1217,7 +1218,8 @@ void W3DView::update(void)
else if (!didScriptedMovement)
{
// we're not scrolling; settle toward desired height above ground
Real zoomAdj = (m_zoom - desiredZoom) * TheGlobalData->m_cameraAdjustSpeed * TheGameEngine->getActualLogicTimeScaleOverFpsRatio();
const Real fpsRatio = (Real)BaseFps / TheGameEngine->getUpdateFps();
const Real zoomAdj = (m_zoom - desiredZoom) * TheGlobalData->m_cameraAdjustSpeed * fpsRatio;
if (fabs(zoomAdj) >= 0.0001f)
{
m_zoom -= zoomAdj;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,8 @@ void W3DView::update(void)
// if scrolling, only adjust if we're too close or too far
if (m_scrollAmount.length() < m_scrollAmountCutoff || (m_currentHeightAboveGround < m_minHeightAboveGround) || (TheGlobalData->m_enforceMaxCameraHeight && m_currentHeightAboveGround > m_maxHeightAboveGround))
{
Real zoomAdj = (desiredZoom - m_zoom) * TheGlobalData->m_cameraAdjustSpeed * TheGameEngine->getActualLogicTimeScaleOverFpsRatio();
const Real fpsRatio = (Real)BaseFps / TheGameEngine->getUpdateFps();
const Real zoomAdj = (desiredZoom - m_zoom) * TheGlobalData->m_cameraAdjustSpeed * fpsRatio;
if (fabs(zoomAdj) >= 0.0001f) // only do positive
{
m_zoom += zoomAdj;
Expand All @@ -1366,7 +1367,8 @@ void W3DView::update(void)
else if (!didScriptedMovement)
{
// we're not scrolling; settle toward desired height above ground
Real zoomAdj = (m_zoom - desiredZoom) * TheGlobalData->m_cameraAdjustSpeed * TheGameEngine->getActualLogicTimeScaleOverFpsRatio();
const Real fpsRatio = (Real)BaseFps / TheGameEngine->getUpdateFps();
const Real zoomAdj = (m_zoom - desiredZoom) * TheGlobalData->m_cameraAdjustSpeed * fpsRatio;
if (fabs(zoomAdj) >= 0.0001f)
{
m_zoom -= zoomAdj;
Expand Down
Loading