This commit is contained in:
Aotumuri
2026-01-25 10:58:01 +09:00
committed by Aotumuri
parent 68bdcd2d23
commit 6443fe790c
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ const TEAM_WEIGHTS: { config: TeamCountConfig; weight: number }[] = [
export class MapPlaylist {
private recentMaps: GameMapType[] = [];
private modeSequenceIndex = 0;
private readonly maxRecentMaps = 5;
// TODO: Adjust based on feedback
private readonly maxRecentMaps = 0; // e.g., 5
private readonly modeSequence: GameMode[];
constructor(private disableTeams: boolean = false) {
+3 -1
View File
@@ -80,6 +80,8 @@ const publicLobbyMapSet = new Set(publicLobbyMaps);
const mapVotesByUser = new Map<string, Set<GameMapType>>();
const mapVoteConnectionsByUser = new Map<string, Set<WebSocket>>();
const mapVoteUserByConnection = new Map<WebSocket, string>();
// TODO: Adjust based on feedback
const MAP_VOTE_WEIGHT = 10000000000; // for debug purposes, make votes very impactful 'w'
const MapVoteMessageSchema = z.object({
type: z.literal("map_vote"),
@@ -180,7 +182,7 @@ function collectMapVoteWeights(): Map<GameMapType, number> {
const weights = new Map<GameMapType, number>();
for (const maps of mapVotesByUser.values()) {
for (const map of maps) {
weights.set(map, (weights.get(map) ?? 0) + 1);
weights.set(map, (weights.get(map) ?? 0) + MAP_VOTE_WEIGHT);
}
}
return weights;