SteamWar/BauSystem
Archiviert
13
0

Fix ArrayIndexOutOfBoundsException #75

Manuell gemergt
Lixfel hat 1 Commits von TNTTracer nach master 2020-07-19 16:40:24 +02:00 zusammengeführt

Datei anzeigen

@ -10,7 +10,7 @@ public class TNTTrace {
private int uniqueID;
private int index = 0;
private float[] positions = new float[243];
private float[] positions = new float[240];
public TNTTrace(int uniqueID) {
this.uniqueID = uniqueID;
@ -21,6 +21,9 @@ public class TNTTrace {
}
public void addLocation(double x, double y, double z) {
if (index >= positions.length) {
positions = Arrays.copyOf(positions, positions.length + 240);
}
positions[index + 0] = (float)x;
positions[index + 1] = (float)y;
positions[index + 2] = (float)z;