Skip to content

Commit 9c00a90

Browse files
committed
chore: remove matchmaking diff , not enough users for 99% of users right now
1 parent 0562115 commit 9c00a90

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/matchmaking/matchmake.service.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,22 @@ export class MatchmakeService {
168168
for (const currentLobby of lobbies.slice(1)) {
169169
const firstLobbyInGroup = currentGroup.at(0);
170170

171+
// TODO - check if rank difference feature is enabled
172+
const rankDiffEnabled = false;
173+
174+
if (!rankDiffEnabled) {
175+
// if rank difference feature is disabled, just add lobbies in order
176+
currentGroup.push(currentLobby);
177+
continue;
178+
}
179+
171180
// calculate wait time in minutes
172181
const waitTimeMinutes = Math.floor(
173182
(Date.now() - firstLobbyInGroup.joinedAt.getTime()) / (1000 * 60),
174183
);
175184

176185
// maximum allowed rank difference increases by 100 for each minute waited
177-
const maxRankDiff = 100 * (waitTimeMinutes + 1);
186+
const maxRankDiff = 1000 * (waitTimeMinutes + 1);
178187

179188
// check if current lobby's rank is within acceptable range
180189
if (
@@ -212,7 +221,9 @@ export class MatchmakeService {
212221
return;
213222
}
214223

215-
await this.matchmake(type, region);
224+
setTimeout(() => {
225+
void this.matchmake(type, region);
226+
}, 5 * 1000);
216227
}
217228

218229
private async processLobbyData(

0 commit comments

Comments
 (0)