SteamWar/MissileWars
Archiviert
13
0

Fix Missile.randomInit

Dieser Commit ist enthalten in:
jojo 2020-09-20 13:37:37 +02:00
Ursprung 842b5ead20
Commit 2a0b316608

Datei anzeigen

@ -187,8 +187,7 @@ public class Missile extends SpecialItem {
File[] files = missileFolder.listFiles();
if (files == null) return;
if (files.length < Config.MissileCount) return;
List<File> pool = new ArrayList<>(files.length);
pool.addAll(Arrays.asList(files));
List<File> pool = new ArrayList<>(Arrays.asList(files));
for (int i = 0; i < Config.MissileCount; i++) {
File missileFile = pool.remove(r.nextInt(pool.size()));