1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02: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 committed by Ethan Lee
parent 01ad6cf1a1
commit fa075010c8

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;