SteamWar/MissileWars
Archiviert
13
0

Hotfix RandomPlayerScript
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-11-15 18:09:52 +01:00
Ursprung 415ec61f7b
Commit a2dafd7a1a

Datei anzeigen

@ -42,7 +42,7 @@ public class RandomPlayerScript implements RunnableScript {
if (size == 0) return true;
int index = random.nextInt(size);
Player player;
if (index > MissileWars.getBlueTeam().getPlayers().size()) {
if (index >= MissileWars.getBlueTeam().getPlayers().size()) {
player = MissileWars.getRedTeam().getPlayers().get(index - MissileWars.getBlueTeam().getPlayers().size());
} else {
player = MissileWars.getBlueTeam().getPlayers().get(index);