Fix Missile.randomInit
Dieser Commit ist enthalten in:
Ursprung
842b5ead20
Commit
2a0b316608
@ -187,8 +187,7 @@ public class Missile extends SpecialItem {
|
|||||||
File[] files = missileFolder.listFiles();
|
File[] files = missileFolder.listFiles();
|
||||||
if (files == null) return;
|
if (files == null) return;
|
||||||
if (files.length < Config.MissileCount) return;
|
if (files.length < Config.MissileCount) return;
|
||||||
List<File> pool = new ArrayList<>(files.length);
|
List<File> pool = new ArrayList<>(Arrays.asList(files));
|
||||||
pool.addAll(Arrays.asList(files));
|
|
||||||
|
|
||||||
for (int i = 0; i < Config.MissileCount; i++) {
|
for (int i = 0; i < Config.MissileCount; i++) {
|
||||||
File missileFile = pool.remove(r.nextInt(pool.size()));
|
File missileFile = pool.remove(r.nextInt(pool.size()));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren