Skip to content
Open
2 changes: 2 additions & 0 deletions Core/GameEngine/Include/Common/OptionPreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ class OptionPreferences : public UserPreferences
Real getResolutionFontAdjustment();

Bool getShowMoneyPerMinute() const;

Real getGameWindowTransitionSpeedMultiplier() const;
};
10 changes: 10 additions & 0 deletions Core/GameEngine/Source/Common/OptionPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Comment thread
Skyaero42 marked this conversation as resolved.
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "GameClient/GameWindow.h"
#include "GameClient/GameWindowManager.h"
#include "Common/FramePacer.h"
#include "Common/GlobalData.h"
//-----------------------------------------------------------------------------
// DEFINES ////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Generals/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,8 @@ GlobalData::GlobalData()
m_showMoneyPerMinute = FALSE;
m_allowMoneyPerMinuteForPlayer = FALSE;

m_gameWindowTransitionSpeedMultiplier = 1.0f;

m_debugShowGraphicalFramerate = FALSE;

// By default, show all asserts.
Expand Down Expand Up @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ GlobalData::GlobalData()
m_showMoneyPerMinute = FALSE;
m_allowMoneyPerMinuteForPlayer = FALSE;

m_gameWindowTransitionSpeedMultiplier = 1.0f;

m_debugShowGraphicalFramerate = FALSE;

// By default, show all asserts.
Expand Down Expand Up @@ -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();
Expand Down
Loading