Skip to content

feat(savegames): Use frame rate from skirmish settings as max frame rate after loading a save game #1416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "Common/PlayerList.h"
#include "Common/RandomValue.h"
#include "Common/Radar.h"
#include "Common/SkirmishPreferences.h"
#include "Common/Team.h"
#include "Common/WellKnownKeys.h"
#include "Common/XferLoad.h"
Expand Down Expand Up @@ -675,6 +676,10 @@ SaveCode GameState::loadGame( AvailableGameInfo gameInfo )
// clear out the game engine
TheGameEngine->reset();

// TheSuperHackers @tweak Caball009 03/08/2025 Use the fps preference from the skirmish settings as fps limit after game engine reset.
if (gameInfo.saveGameInfo.saveFileType != SAVE_FILE_TYPE_MISSION)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this condition necessary?

TheGameEngine->setFramesPerSecondLimit(SkirmishPreferences().getInt("FPS", TheGlobalData->m_framesPerSecondLimit));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the SkirmishPreferences will be applied when loading a Campaign Mission savegame?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but only to manual save games, not automatic save games ("Mission Start").


// lock creation of new ghost objects
TheGhostObjectManager->saveLockGhostObjects( TRUE );

Expand Down
Loading