Skip to content

Commit bf1a80c

Browse files
committed
better impl
1 parent 69a6b89 commit bf1a80c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/hacks.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,13 @@ void proceedWithReset(LevelInfoLayer* levelInfoLayer, GJGameLevel* level, bool r
132132
}
133133
}
134134
if (resetCoins) {
135-
GSM->setStat("12", GSM->getStat("12") - level->m_coinsVerified);
135+
auto coinDict = GSM->m_verifiedUserCoins;
136+
for (auto i = 0; i < level->m_coins; i++) {
137+
auto key = level->getCoinKey(i + 1);
138+
if (GSM->hasUserCoin(key) || GSM->hasPendingUserCoin(key)) {
139+
GSM->setStat("12", GSM->getStat("12") - 1);
140+
}
141+
}
136142
}
137143
}
138144
level->m_normalPercent = 0;

0 commit comments

Comments
 (0)