New splash damage algorithm
@@ -158,9 +158,9 @@ public class Bresenham2{
int yStep = (startY < endY ? +1 : -1);
int error = xDist + yDist;
+ while(startX != endX || startY != endY){
output.add(pool.obtain().set(startX, startY));
- while(startX != endX || startY != endY){
if(2 * error - yDist > xDist - 2 * error){
error += yDist;
startX += xStep;
@@ -168,8 +168,6 @@ public class Bresenham2{
error += xDist;
startY += yStep;
}
-
- output.add(pool.obtain().set(startX, startY));
}
return output;
}
