Skip to content

Commit

Permalink
Fix wrong caching for blanks in saved (part of #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Dec 8, 2023
1 parent 2285f44 commit 824cc90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/managers/BetterInfoCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ void BetterInfoCache::checkDailies() {
if(currentLvl == nullptr) continue;

auto idString = std::to_string(currentLvl->m_levelID);
if(objectExists("level-name-dict", idString) && objectExists("coin-count-dict", idString) && objectExists("demon-difficulty-dict", idString)) continue;
if(objectExists("level-name-dict", idString) && objectExists("coin-count-dict", idString) && objectExists("demon-difficulty-dict", idString) && getLevelName(currentLvl->m_levelID) != "") continue;

auto levelFromSaved = static_cast<GJGameLevel*>(GLM->m_onlineLevels->objectForKey(std::to_string(currentLvl->m_levelID).c_str()));
if(levelFromSaved != nullptr) cacheLevel(levelFromSaved);
if(levelFromSaved != nullptr && std::string(levelFromSaved->m_levelName) != "") cacheLevel(levelFromSaved);
else toDownload.insert(currentLvl->m_levelID);
}

Expand Down

0 comments on commit 824cc90

Please sign in to comment.