Skip to content

Commit fea51f9

Browse files
committed
feat(goal): Fix incorrect goal getting shown after game restart
1 parent 550cb02 commit fea51f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/roulette/manager/DataManager.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ namespace DataManager
9595
std::ifstream saveDataFileIn(saveDataPath, std::ios::binary);
9696
saveDataFileIn.seekg(0, std::ios::end);
9797

98+
// TODO: this check always fails on Android :D
9899
if (force_clean || saveDataFileIn.fail() || saveDataFileIn.tellg() != sizeof(GameState))
99100
{
100101
GameState defaultValue;

src/roulette/manager/RouletteManager.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct RouletteManager
4545
gameState = DataManager::setDefaultSafe<DMMiscKey::SAVE_DATA>();
4646

4747
if (gameState.levelID != 0)
48-
currentPercentageGoal = gameState.levelPercentage;
48+
currentPercentageGoal = gameState.levelPercentageGoal;
4949

5050
previousDifficulty = getDifficultyFromSaveContainer<DMArrayKey::DIFFICULTY_ARRAY>();
5151
previousDemonDifficulty = getDifficultyFromSaveContainer<DMArrayKey::DEMON_DIFFICULTY_ARRAY>();

0 commit comments

Comments
 (0)