Fix Leaderboard IndexOutOfBoundsException
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
1dca94056d
Commit
c89a0513ff
@ -37,6 +37,7 @@ public class Leaderboard {
|
|||||||
entities.forEach(REntity::die);
|
entities.forEach(REntity::die);
|
||||||
entities.clear();
|
entities.clear();
|
||||||
List<LeaderboardEntry> leaderboard = getLeaderboard();
|
List<LeaderboardEntry> leaderboard = getLeaderboard();
|
||||||
|
if (leaderboard.isEmpty()) return;
|
||||||
long bestTime = leaderboard.get(0).time;
|
long bestTime = leaderboard.get(0).time;
|
||||||
for (int i = 0; i <= best; i++) {
|
for (int i = 0; i <= best; i++) {
|
||||||
if (best - i >= leaderboard.size()) continue;
|
if (best - i >= leaderboard.size()) continue;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren