Skip to content

Commit

Permalink
fix secrets resetting after using compass (fixes #86)
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Mar 17, 2021
1 parent 70e1993 commit 826e6f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,12 @@ void DoCompassOption(INVENTORY_ITEM *inv_item)

int32_t secrets_taken = 0;
int32_t secrets_total = MAX_SECRETS;
int32_t secrets_flags = SaveGame.secrets;
do {
if (SaveGame.secrets & 1) {
if (secrets_flags & 1) {
secrets_taken++;
}
SaveGame.secrets >>= 1;
secrets_flags >>= 1;
secrets_total--;
} while (secrets_total);
sprintf(
Expand Down

0 comments on commit 826e6f9

Please sign in to comment.