1
0
mirror of synced 2024-11-12 01:10:47 +01:00

update cheated time detection

This commit is contained in:
Shiroi Kitsu 2023-03-15 13:36:32 +07:00
parent fafb3490f4
commit d941452cbb
2 changed files with 31 additions and 22 deletions

View File

@ -52,6 +52,12 @@ export async function saveTimeAttackResult(body: wm.protobuf.SaveGameResultReque
cheatedTime = true;
}
// Check the time again
if (body.taResult!.time <= 0 || body.taResult!.time >= 1200000 || body.taResult!.time.toString() == "-2147483648")
{
cheatedTime = true;
}
// Not Cheated Time
if(cheatedTime === false)
{
@ -84,7 +90,10 @@ export async function saveTimeAttackResult(body: wm.protobuf.SaveGameResultReque
});
}
}
else // Creating a new record
// Creating a new record
else
{
if (body.taResult!.time < 1200000)
{
console.log('Creating new time attack record');
@ -108,6 +117,7 @@ export async function saveTimeAttackResult(body: wm.protobuf.SaveGameResultReque
});
}
}
}
// else {} cheated time, ignore it
}
}

View File

@ -1,2 +1 @@
node dist
pause