From 80c591e64aa79e3c50096f1c4d34e605ce87d842 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 3 Apr 2015 22:07:30 -0400 Subject: [PATCH] v0.3.0: fixed a bug with new ballistica system (somehow I always get Math.min & Math.max mixed up) --- .../shatteredpixeldungeon/mechanics/Ballistica.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java b/src/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java index 26d233b74..a4f2d848a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java @@ -135,7 +135,7 @@ public class Ballistica { //if there is an error, returns an empty arraylist instead. public List subPath(int start, int end){ try { - end = Math.max( end, path.size()-1); + end = Math.min( end, path.size()-1); return path.subList(start, end+1); } catch (Exception e){ return new ArrayList<>();