diff --git a/Core/GameEngine/Include/Common/OptionPreferences.h b/Core/GameEngine/Include/Common/OptionPreferences.h index 8448ccd1a14..ae7580cac51 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 getGameWindowTransitionSpeed() const; }; diff --git a/Core/GameEngine/Source/Common/OptionPreferences.cpp b/Core/GameEngine/Source/Common/OptionPreferences.cpp index bab11cb7c76..946e780e676 100644 --- a/Core/GameEngine/Source/Common/OptionPreferences.cpp +++ b/Core/GameEngine/Source/Common/OptionPreferences.cpp @@ -884,3 +884,15 @@ Bool OptionPreferences::getShowMoneyPerMinute() const } return FALSE; } + +Real OptionPreferences::getGameWindowTransitionSpeed() const +{ + OptionPreferences::const_iterator it = find("GameWindowTransitionSpeed"); + if (it == end()) + return 1.0f; + + Real speed = (Real) atof(it->second.str()); + if (speed <= 0.0f) + return 1.0f; + return min(speed, 1000.0f); +} diff --git a/Core/GameEngine/Source/GameClient/GUI/GameWindowTransitions.cpp b/Core/GameEngine/Source/GameClient/GUI/GameWindowTransitions.cpp index 0685fc85b9d..17ba692b7cf 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_gameWindowTransitionSpeed; 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..4f5b5cde1cc 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_gameWindowTransitionSpeed; + 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..cbefc7cb07c 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_gameWindowTransitionSpeed = 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_gameWindowTransitionSpeed = optionPref.getGameWindowTransitionSpeed(); 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..ea33391acc4 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_gameWindowTransitionSpeed; + 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..4cdf056cc59 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_gameWindowTransitionSpeed = 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_gameWindowTransitionSpeed = optionPref.getGameWindowTransitionSpeed(); TheWritableGlobalData->m_antiAliasLevel = optionPref.getAntiAliasing(); TheWritableGlobalData->m_textureFilteringMode = optionPref.getTextureFilterMode();