1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

yet another fix to racing

This commit is contained in:
Zeno Rogue 2022-08-07 15:01:28 +02:00
parent ce8e3c8640
commit e686f5bc39

View File

@ -1265,7 +1265,10 @@ EX void loadsave() {
int land, score;
sscanf(buf, "%70s%9s%d%d", buf1, ver, &land, &score);
/* score may equal 0 because of earlier bugs */
if(score) racing::best_scores[eLand(land)] = score;
if(score) {
auto& res = racing::best_scores[eLand(land)];
if(score < res || res == 0) res = score;
}
println(hlog, "loaded the score for ", dnameof(eLand(land)), " of ", score);
}
#endif