1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Fix being able to set lower custom level score

For reference, here is the list of scores for a custom level:
 0 - not played
 1 - finished
 2 - all trinkets
 3 - finished, all trinkets

Previously, you could've played a level and finished it and set a score
of 3. Then you could re-play the entire level, but manage to only get a
score of 1, i.e. only finished but not with all trinkets. Then your
score for that level would get set back to 1, which basically nullifies
the time you spent playing that level and getting all of the trinkets.

This commit makes it so your new score will get set only if it is higher
than the previous one.
This commit is contained in:
Info Teddy 2020-01-13 17:54:44 -08:00
parent 01ad6cf1a1
commit 25779606b4

View file

@ -449,7 +449,7 @@ void Game::updatecustomlevelstats(std::string clevel, int cscore)
j=numcustomlevelstats+1;
}
}
if(tvar>=0)
if(tvar>=0 && cscore > customlevelscore[tvar])
{
//update existing entry
customlevelscore[tvar]=cscore;