Skip to content

Commit 4f00c4a

Browse files
committed
Increase public game ffa frequency to 3:2 ffa:teams
1 parent 3fd38e7 commit 4f00c4a

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/server/MapPlaylist.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,27 @@ export class MapPlaylist {
127127

128128
const rand = new PseudoRandom(Date.now());
129129

130-
const ffa: GameMapType[] = rand.shuffleArray([...maps]);
131-
const team: GameMapType[] = rand.shuffleArray([...maps]);
130+
const ffa1: GameMapType[] = rand.shuffleArray([...maps]);
131+
const team1: GameMapType[] = rand.shuffleArray([...maps]);
132+
const ffa2: GameMapType[] = rand.shuffleArray([...maps]);
133+
const team2: GameMapType[] = rand.shuffleArray([...maps]);
134+
const ffa3: GameMapType[] = rand.shuffleArray([...maps]);
132135

133136
this.mapsPlaylist = [];
134137
for (let i = 0; i < maps.length; i++) {
135-
if (!this.addNextMap(this.mapsPlaylist, ffa, GameMode.FFA)) {
138+
if (!this.addNextMap(this.mapsPlaylist, ffa1, GameMode.FFA)) {
136139
return false;
137140
}
138-
if (!this.addNextMap(this.mapsPlaylist, team, GameMode.Team)) {
141+
if (!this.addNextMap(this.mapsPlaylist, team1, GameMode.Team)) {
142+
return false;
143+
}
144+
if (!this.addNextMap(this.mapsPlaylist, ffa2, GameMode.FFA)) {
145+
return false;
146+
}
147+
if (!this.addNextMap(this.mapsPlaylist, team2, GameMode.Team)) {
148+
return false;
149+
}
150+
if (!this.addNextMap(this.mapsPlaylist, ffa3, GameMode.FFA)) {
139151
return false;
140152
}
141153
}

0 commit comments

Comments
 (0)