mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb1c0c7625 | ||
|
|
1170676141 | ||
|
|
7baaaa9db9 | ||
|
|
c1ecef0179 |
No files matched your search
@@ -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
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blitzkrieg",
|
"name": "blitzkrieg",
|
||||||
"version": "1.15.1",
|
"version": "1.15.2",
|
||||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||||
"main": "src/server.ts",
|
"main": "src/server.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -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);
|
const { neighbors } = await getRatingsNeighbors(region, id, size, true);
|
||||||
|
|
||||||
useLeaderboardCache.setState(
|
useLeaderboardCache.setState(
|
||||||
produce((draft: LeaderboardCache) => {
|
produce((draft: LeaderboardCache) => {
|
||||||
neighbors.forEach((neighbor, neighborIndex) => {
|
neighbors.forEach((neighbor, neighborIndex) => {
|
||||||
// const position = neighborIndex - radius + seedingPlayerPosition;
|
|
||||||
const position = neighbor.number - 1;
|
const position = neighbor.number - 1;
|
||||||
|
|
||||||
if (!(position in draft[region][season])) {
|
if (!(position in draft[region][season])) {
|
||||||
@@ -347,9 +339,9 @@ export default function Page() {
|
|||||||
async function jumpToPosition(position: number) {
|
async function jumpToPosition(position: number) {
|
||||||
if (!ratingsInfo || ratingsInfo?.detail) return;
|
if (!ratingsInfo || ratingsInfo?.detail) return;
|
||||||
|
|
||||||
const targetPosition = Math.max(
|
const targetPosition = Math.min(
|
||||||
0,
|
ratingsInfo.count - 1,
|
||||||
Math.min(position, ratingsInfo.count - 1),
|
Math.max(0, Math.min(position, ratingsInfo.count - 1)),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (season === 0) {
|
if (season === 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user