Skip to content

Commit

Permalink
feat(goal): Fix incorrect goal getting shown after game restart
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettDev committed Nov 28, 2024
1 parent 550cb02 commit fea51f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/roulette/manager/DataManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ namespace DataManager
std::ifstream saveDataFileIn(saveDataPath, std::ios::binary);
saveDataFileIn.seekg(0, std::ios::end);

// TODO: this check always fails on Android :D
if (force_clean || saveDataFileIn.fail() || saveDataFileIn.tellg() != sizeof(GameState))
{
GameState defaultValue;
Expand Down
2 changes: 1 addition & 1 deletion src/roulette/manager/RouletteManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct RouletteManager
gameState = DataManager::setDefaultSafe<DMMiscKey::SAVE_DATA>();

if (gameState.levelID != 0)
currentPercentageGoal = gameState.levelPercentage;
currentPercentageGoal = gameState.levelPercentageGoal;

previousDifficulty = getDifficultyFromSaveContainer<DMArrayKey::DIFFICULTY_ARRAY>();
previousDemonDifficulty = getDifficultyFromSaveContainer<DMArrayKey::DEMON_DIFFICULTY_ARRAY>();
Expand Down

0 comments on commit fea51f9

Please sign in to comment.