dungeons-of-moria / umoria

Moria: a roguelike Dungeon Crawler game | Umoria Source Code
https://umoria.org
GNU General Public License v3.0
353 stars 76 forks source link

How to publish a release that allows scores? #36

Closed andrewtweber closed 3 years ago

andrewtweber commented 3 years ago

First of all, thanks so much for modernizing Umoria... I really missed this game.

I forked it and ported Colour-Umoria back in.

But when I build from source and try to publish a release, loading saved games doesn't work. It gives these messages and marks it as a Duplicate:

This character is already on the scoreboard; it will not be scored again. -more- This save file cannot be used to get on the score board.

I can see where it checks for game.noscore but I'm not sure why that is being set to non-zero. Is there some flag I need to set when building for a release that allows people to load saved games?

andrewtweber commented 3 years ago

I've narrowed it down to game_save.cpp:879

else if ((~game.noscore) & 0x04) {
    printMessage("This character is already on the scoreboard; it will not be scored again.");
    game.noscore |= 0x4;
}

This seems to be the issue, if game.noscore is 0, then that if statement will always be true and I don't see how it would ever return false.

mrcook commented 3 years ago

Hi Andrew, nice to see the game with a splash of colour!

Thanks for creating this issue. I'm not really able to work on umoria at the moment, but once I can get life back to normal I will certainly take a look.

mrcook commented 3 years ago

Hi Andrew, this bug was unfortunatately introduced with this PR: https://github.com/dungeons-of-moria/umoria/pull/33/files and I did not test it carefully enough. I've now reverted this change here: https://github.com/dungeons-of-moria/umoria/commit/6cf0bd30ced3f547960aa5600648448465cd0a9f, which seems to fix the issue.