diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp index 529e03ec2f..afe0e3fc94 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp @@ -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; @@ -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: diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp index 695fdde063..99ad42d6b8 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp @@ -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; @@ -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: