From c1ecef01796d9162b703dd755372691818613a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:55:11 -0600 Subject: [PATCH 1/3] fix: add max target position --- package.json | 2 +- src/app/tools/ratings/page.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index cc2eefeac..7342591a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blitzkrieg", - "version": "1.15.1", + "version": "1.15.2", "description": "🎉 Tools for everything World of Tanks Blitz", "main": "src/server.ts", "type": "module", diff --git a/src/app/tools/ratings/page.tsx b/src/app/tools/ratings/page.tsx index fe70ff97f..0b8c5ac7a 100644 --- a/src/app/tools/ratings/page.tsx +++ b/src/app/tools/ratings/page.tsx @@ -347,9 +347,9 @@ export default function Page() { async function jumpToPosition(position: number) { if (!ratingsInfo || ratingsInfo?.detail) return; - const targetPosition = Math.max( - 0, - Math.min(position, ratingsInfo.count - 1), + const targetPosition = Math.min( + ratingsInfo.count - 1, + Math.max(0, Math.min(position, ratingsInfo.count - 1)), ); if (season === 0) { From 7baaaa9db949aa887bb1d003fe4431cd28bd7c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:02:00 -0600 Subject: [PATCH 2/3] fix: remove seeding player neighbor checking --- src/app/tools/ratings/page.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/tools/ratings/page.tsx b/src/app/tools/ratings/page.tsx index 0b8c5ac7a..979e4c1c3 100644 --- a/src/app/tools/ratings/page.tsx +++ b/src/app/tools/ratings/page.tsx @@ -299,19 +299,11 @@ export default function Page() { } } - const seedingPlayerNeighborEntry = Object.entries( - leaderboard[region][season], - ).find(([, player]) => id === player); - - if (seedingPlayerNeighborEntry === undefined) return null; - - // const seedingPlayerPosition = parseInt(seedingPlayerNeighborEntry[0]); const { neighbors } = await getRatingsNeighbors(region, id, size, true); useLeaderboardCache.setState( produce((draft: LeaderboardCache) => { neighbors.forEach((neighbor, neighborIndex) => { - // const position = neighborIndex - radius + seedingPlayerPosition; const position = neighbor.number - 1; if (!(position in draft[region][season])) { From 11706761413469a77d2ad2338b7bbd7034f4fa3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:05:39 -0600 Subject: [PATCH 3/3] feat: changelogs --- docs/changelogs/1.15.2.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/changelogs/1.15.2.md diff --git a/docs/changelogs/1.15.2.md b/docs/changelogs/1.15.2.md new file mode 100644 index 000000000..4f95b9741 --- /dev/null +++ b/docs/changelogs/1.15.2.md @@ -0,0 +1,9 @@ +# Blitzkrieg 1.15.2 + +Infinity reduced to a finite value. + +## Fixes + +- Added a maximum value to the jump to position button +- Removed neighbor checking for the seeding player + - This fixes the jump to position button not loading at all