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; if (size == 0) return true;
int index = random.nextInt(size); int index = random.nextInt(size);
Player player; Player player;
if (index > MissileWars.getBlueTeam().getPlayers().size()) { if (index >= MissileWars.getBlueTeam().getPlayers().size()) {
player = MissileWars.getRedTeam().getPlayers().get(index - MissileWars.getBlueTeam().getPlayers().size()); player = MissileWars.getRedTeam().getPlayers().get(index - MissileWars.getBlueTeam().getPlayers().size());
} else { } else {
player = MissileWars.getBlueTeam().getPlayers().get(index); player = MissileWars.getBlueTeam().getPlayers().get(index);