diff --git a/Core/GameEngine/Include/Common/OptionPreferences.h b/Core/GameEngine/Include/Common/OptionPreferences.h index 8448ccd1a14..9da2f47e9d1 100644 --- a/Core/GameEngine/Include/Common/OptionPreferences.h +++ b/Core/GameEngine/Include/Common/OptionPreferences.h @@ -129,4 +129,6 @@ class OptionPreferences : public UserPreferences Real getResolutionFontAdjustment(); Bool getShowMoneyPerMinute() const; + + Real getGameWindowTransitionSpeedMultiplier() const; }; diff --git a/Core/GameEngine/Source/Common/OptionPreferences.cpp b/Core/GameEngine/Source/Common/OptionPreferences.cpp index bab11cb7c76..308447ed5f9 100644 --- a/Core/GameEngine/Source/Common/OptionPreferences.cpp +++ b/Core/GameEngine/Source/Common/OptionPreferences.cpp @@ -884,3 +884,13 @@ Bool OptionPreferences::getShowMoneyPerMinute() const } return FALSE; } + +Real OptionPreferences::getGameWindowTransitionSpeedMultiplier() const +{ + OptionPreferences::const_iterator it = find("GameWindowTransitionSpeedMultiplier"); + if (it == end()) + return 1.0f; + + Real speed = (Real) atof(it->second.str()); + return clamp(1.0f, speed, 1000.0f); +} diff --git a/Core/GameEngine/Source/GameClient/GUI/GameWindowTransitions.cpp b/Core/GameEngine/Source/GameClient/GUI/GameWindowTransitions.cpp index 0685fc85b9d..09f22640cf4 100644 --- a/Core/GameEngine/Source/GameClient/GUI/GameWindowTransitions.cpp +++ b/Core/GameEngine/Source/GameClient/GUI/GameWindowTransitions.cpp @@ -56,6 +56,7 @@ #include "GameClient/GameWindow.h" #include "GameClient/GameWindowManager.h" #include "Common/FramePacer.h" +#include "Common/GlobalData.h" //----------------------------------------------------------------------------- // DEFINES //////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- @@ -274,7 +275,8 @@ void TransitionGroup::update() // TheSuperHackers @tweak bobtista GUI transition timing is now decoupled from the render update. // Step every integer frame between the old and new accumulator value so discrete-state-machine // transitions cannot skip a state when the render frame rate dips below the base rate. - const Real timeScale = TheFramePacer->getBaseOverUpdateFpsRatio(); + // TheSuperHackers @feature bobtista 28/06/2026 Scale by the user game window transition speed preference. + const Real timeScale = TheFramePacer->getBaseOverUpdateFpsRatio() * TheGlobalData->m_gameWindowTransitionSpeedMultiplier; const Int prevFrame = (Int)m_currentFrame; m_currentFrame += m_directionMultiplier * timeScale; const Int newFrame = (Int)m_currentFrame; diff --git a/Generals/Code/GameEngine/Include/Common/GlobalData.h b/Generals/Code/GameEngine/Include/Common/GlobalData.h index 67264cbea62..a35f7169817 100644 --- a/Generals/Code/GameEngine/Include/Common/GlobalData.h +++ b/Generals/Code/GameEngine/Include/Common/GlobalData.h @@ -426,6 +426,9 @@ class GlobalData : public SubsystemInterface Bool m_showMoneyPerMinute; Bool m_allowMoneyPerMinuteForPlayer; + // TheSuperHackers @feature bobtista 28/06/2026 user-configurable speed multiplier for game window transitions + Real m_gameWindowTransitionSpeedMultiplier; + Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL Real m_shakeStrongIntensity; ///< Intensity for shaking a camera with SHAKE_STRONG diff --git a/Generals/Code/GameEngine/Source/Common/GlobalData.cpp b/Generals/Code/GameEngine/Source/Common/GlobalData.cpp index 3aabf4ca449..a171f46aebc 100644 --- a/Generals/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/Generals/Code/GameEngine/Source/Common/GlobalData.cpp @@ -956,6 +956,8 @@ GlobalData::GlobalData() m_showMoneyPerMinute = FALSE; m_allowMoneyPerMinuteForPlayer = FALSE; + m_gameWindowTransitionSpeedMultiplier = 1.0f; + m_debugShowGraphicalFramerate = FALSE; // By default, show all asserts. @@ -1217,6 +1219,7 @@ void GlobalData::parseGameDataDefinition( INI* ini ) TheWritableGlobalData->m_gameTimeFontSize = optionPref.getGameTimeFontSize(); TheWritableGlobalData->m_playerInfoListFontSize = optionPref.getPlayerInfoListFontSize(); TheWritableGlobalData->m_showMoneyPerMinute = optionPref.getShowMoneyPerMinute(); + TheWritableGlobalData->m_gameWindowTransitionSpeedMultiplier = optionPref.getGameWindowTransitionSpeedMultiplier(); TheWritableGlobalData->m_antiAliasLevel = optionPref.getAntiAliasing(); TheWritableGlobalData->m_textureFilteringMode = optionPref.getTextureFilterMode(); diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h index 4c5130e1c05..a69dcdd4444 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h @@ -427,6 +427,9 @@ class GlobalData : public SubsystemInterface Bool m_showMoneyPerMinute; Bool m_allowMoneyPerMinuteForPlayer; + // TheSuperHackers @feature bobtista 28/06/2026 user-configurable speed multiplier for game window transitions + Real m_gameWindowTransitionSpeedMultiplier; + Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL Real m_shakeStrongIntensity; ///< Intensity for shaking a camera with SHAKE_STRONG diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp index 9900029d48d..ada4995cfa1 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp @@ -963,6 +963,8 @@ GlobalData::GlobalData() m_showMoneyPerMinute = FALSE; m_allowMoneyPerMinuteForPlayer = FALSE; + m_gameWindowTransitionSpeedMultiplier = 1.0f; + m_debugShowGraphicalFramerate = FALSE; // By default, show all asserts. @@ -1224,6 +1226,7 @@ void GlobalData::parseGameDataDefinition( INI* ini ) TheWritableGlobalData->m_gameTimeFontSize = optionPref.getGameTimeFontSize(); TheWritableGlobalData->m_playerInfoListFontSize = optionPref.getPlayerInfoListFontSize(); TheWritableGlobalData->m_showMoneyPerMinute = optionPref.getShowMoneyPerMinute(); + TheWritableGlobalData->m_gameWindowTransitionSpeedMultiplier = optionPref.getGameWindowTransitionSpeedMultiplier(); TheWritableGlobalData->m_antiAliasLevel = optionPref.getAntiAliasing(); TheWritableGlobalData->m_textureFilteringMode = optionPref.getTextureFilterMode();