update cheated time detection
This commit is contained in:
parent
fafb3490f4
commit
d941452cbb
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user