Update index.js
Browse files
index.js
CHANGED
|
@@ -892,8 +892,8 @@ io.on('connection', (socket) => {
|
|
| 892 |
const nextCurrentLap = Number(payload.currentLap);
|
| 893 |
if (Number.isFinite(nextCurrentLap)) {
|
| 894 |
if (nextCurrentLap <= current.currentLap + 1) {
|
| 895 |
-
if (nextCurrentLap > current.currentLap && current.highestCheckpointReached < 16) {
|
| 896 |
-
// reject invalid lap jump
|
| 897 |
} else {
|
| 898 |
current.currentLap = nextCurrentLap;
|
| 899 |
}
|
|
|
|
| 892 |
const nextCurrentLap = Number(payload.currentLap);
|
| 893 |
if (Number.isFinite(nextCurrentLap)) {
|
| 894 |
if (nextCurrentLap <= current.currentLap + 1) {
|
| 895 |
+
if (nextCurrentLap > current.currentLap && current.highestCheckpointReached < 16 && current.highestCheckpointReached > 5) {
|
| 896 |
+
// reject invalid lap jump (or recently wrapped to the start)
|
| 897 |
} else {
|
| 898 |
current.currentLap = nextCurrentLap;
|
| 899 |
}
|