File tree Expand file tree Collapse file tree 2 files changed +26
-6
lines changed
GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream
Generals/Code/GameEngine/Source/GameClient/MessageStream Expand file tree Collapse file tree 2 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 62
62
63
63
static Bool scrollDir[4 ] = { false , false , false , false };
64
64
65
- Int SCROLL_AMT = 100 ;
65
+ // TheSuperHackers @tweak Introduces the SCROLL_MULTIPLIER for all scrolling to
66
+ //
67
+ // 1. bring the RMB scroll speed back to how it was at 30 FPS in the retail game version
68
+ // 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)
69
+ // 3. increase the scroll speed for Edge/Key scrolling to better fit the high speeds of RMB scrolling
70
+ //
71
+ // The multiplier of 2 was logically chosen because originally the Scroll Factor did practically not affect the RMB scroll speed
72
+ // and because the default Scroll Factor is/was 0.5, it needs to be doubled to get to a neutral 1x multiplier.
73
+
74
+ CONSTEXPR const Real SCROLL_MULTIPLIER = 2 .0f ;
75
+ CONSTEXPR const Real SCROLL_AMT = 100 .0f * SCROLL_MULTIPLIER;
66
76
67
77
static const Int edgeScrollSize = 3 ;
68
78
@@ -430,8 +440,8 @@ GameMessageDisposition LookAtTranslator::translateGameMessage(const GameMessage
430
440
// TheSuperHackers @info calculate the length of the vector to obtain the movement speed before the vector is normalized
431
441
float vecLength = vec.length ();
432
442
vec.normalize ();
433
- offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * TheGlobalData->m_keyboardScrollFactor ;
434
- offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * TheGlobalData->m_keyboardScrollFactor ;
443
+ offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor ;
444
+ offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor ;
435
445
}
436
446
break ;
437
447
case SCROLL_KEY:
Original file line number Diff line number Diff line change 62
62
63
63
static Bool scrollDir[4 ] = { false , false , false , false };
64
64
65
- Int SCROLL_AMT = 100 ;
65
+ // TheSuperHackers @tweak Introduces the SCROLL_MULTIPLIER for all scrolling to
66
+ //
67
+ // 1. bring the RMB scroll speed back to how it was at 30 FPS in the retail game version
68
+ // 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)
69
+ // 3. increase the scroll speed for Edge/Key scrolling to better fit the high speeds of RMB scrolling
70
+ //
71
+ // The multiplier of 2 was logically chosen because originally the Scroll Factor did practically not affect the RMB scroll speed
72
+ // and because the default Scroll Factor is/was 0.5, it needs to be doubled to get to a neutral 1x multiplier.
73
+
74
+ CONSTEXPR const Real SCROLL_MULTIPLIER = 2 .0f ;
75
+ CONSTEXPR const Real SCROLL_AMT = 100 .0f * SCROLL_MULTIPLIER;
66
76
67
77
static const Int edgeScrollSize = 3 ;
68
78
@@ -429,8 +439,8 @@ GameMessageDisposition LookAtTranslator::translateGameMessage(const GameMessage
429
439
// TheSuperHackers @info calculate the length of the vector to obtain the movement speed before the vector is normalized
430
440
float vecLength = vec.length ();
431
441
vec.normalize ();
432
- offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * TheGlobalData->m_keyboardScrollFactor ;
433
- offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * TheGlobalData->m_keyboardScrollFactor ;
442
+ offset.x = TheGlobalData->m_horizontalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.x * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor ;
443
+ offset.y = TheGlobalData->m_verticalScrollSpeedFactor * logicToFpsRatio * vecLength * vec.y * SCROLL_MULTIPLIER * TheGlobalData->m_keyboardScrollFactor ;
434
444
}
435
445
break ;
436
446
case SCROLL_KEY:
You can’t perform that action at this time.
0 commit comments