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 @@ -62,7 +62,17 @@ enum

static Bool scrollDir[4] = { false, false, false, false };

Int SCROLL_AMT = 100;
// TheSuperHackers @tweak Introduces the SCROLL_MULTIPLIER for all scrolling to
//
// 1. bring the RMB scroll speed back to how it was at 30 FPS in the retail game version
// 2. increase the upper limit of the Scroll Factor when set from the Options Menu (0.20 to 2.90 instead of 0.10 to 1.45)
// 3. increase the scroll speed for Edge/Key scrolling to better fit the high speeds of RMB scrolling
//
// The multiplier of 2 was logically chosen because originally the Scroll Factor did practically not affect the RMB scroll speed
// and because the default Scroll Factor is/was 0.5, it needs to be doubled to get to a neutral 1x multiplier.

CONSTEXPR const Real SCROLL_MULTIPLIER = 2.0f;
CONSTEXPR const Real SCROLL_AMT = 100.0f * SCROLL_MULTIPLIER;

static const Int edgeScrollSize = 3;

Expand Down Expand Up @@ -430,8 +440,8 @@ GameMessageDisposition LookAtTranslator::translateGameMessage(const GameMessage
// TheSuperHackers @info calculate the length of the vector to obtain the movement speed before the vector is normalized
float vecLength = vec.length();
vec.normalize();
offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * TheGlobalData->m_keyboardScrollFactor;
offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * TheGlobalData->m_keyboardScrollFactor;
offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor;
offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor;
}
break;
case SCROLL_KEY:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ enum

static Bool scrollDir[4] = { false, false, false, false };

Int SCROLL_AMT = 100;
// TheSuperHackers @tweak Introduces the SCROLL_MULTIPLIER for all scrolling to
//
// 1. bring the RMB scroll speed back to how it was at 30 FPS in the retail game version
// 2. increase the upper limit of the Scroll Factor when set from the Options Menu (0.20 to 2.90 instead of 0.10 to 1.45)
// 3. increase the scroll speed for Edge/Key scrolling to better fit the high speeds of RMB scrolling
//
// The multiplier of 2 was logically chosen because originally the Scroll Factor did practically not affect the RMB scroll speed
// and because the default Scroll Factor is/was 0.5, it needs to be doubled to get to a neutral 1x multiplier.

CONSTEXPR const Real SCROLL_MULTIPLIER = 2.0f;
CONSTEXPR const Real SCROLL_AMT = 100.0f * SCROLL_MULTIPLIER;

static const Int edgeScrollSize = 3;

Expand Down Expand Up @@ -429,8 +439,8 @@ GameMessageDisposition LookAtTranslator::translateGameMessage(const GameMessage
// TheSuperHackers @info calculate the length of the vector to obtain the movement speed before the vector is normalized
float vecLength = vec.length();
vec.normalize();
offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * TheGlobalData->m_keyboardScrollFactor;
offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * TheGlobalData->m_keyboardScrollFactor;
offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor;
offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor;
}
break;
case SCROLL_KEY:
Expand Down
Loading