mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: remove neighbor relative positional caching
This commit is contained in:
1 parent
14710b5218
commit
ee6d2e7d82
1 file changed
+3
-2
@@ -305,13 +305,14 @@ export default function Page() {
|
||||
|
||||
if (seedingPlayerNeighborEntry === undefined) return null;
|
||||
|
||||
const seedingPlayerPosition = parseInt(seedingPlayerNeighborEntry[0]);
|
||||
// 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 = neighborIndex - radius + seedingPlayerPosition;
|
||||
const position = neighbor.number - 1;
|
||||
|
||||
if (!(position in draft[region][season])) {
|
||||
draft[region][season][position] = neighbor.spa_id;
|
||||
|
||||
Reference in new issue
Block a user