mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 16:28:50 -07:00
Update comment in GameDataService.cs
This commit is contained in:
parent
900bdbb73d
commit
b112bc6afd
@ -171,8 +171,8 @@ public class GameDataService {
|
|||||||
foreach (var pair in GetGameDataPairs(xmlDocumentData)) {
|
foreach (var pair in GetGameDataPairs(xmlDocumentData)) {
|
||||||
GameDataPair? dbPair = gameData.GameDataPairs.FirstOrDefault(x => x.Name == pair.Name);
|
GameDataPair? dbPair = gameData.GameDataPairs.FirstOrDefault(x => x.Name == pair.Name);
|
||||||
|
|
||||||
// If Name == "time" then (existing <= incoming) needs to be false (effectively (existing > incoming), as time should function).
|
// If the score type is "time", use newBest <= existing (newest time is smaller than (or the same as) existing time).
|
||||||
// if Name is anything else, then second condition as normal.
|
// For anything else, use newBest > existing (newest score is larger than existing score).
|
||||||
bool newBest = (dbPair == null) || ((pair.Name == "time") != (dbPair.Value <= pair.Value));
|
bool newBest = (dbPair == null) || ((pair.Name == "time") != (dbPair.Value <= pair.Value));
|
||||||
|
|
||||||
if (dbPair == null) {
|
if (dbPair == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user