Fix bug with wrong trackers being read in skeleton if no leg trackers are attached

This commit is contained in:
Eiren Rain committed 2021-12-02 02:11:01 +02:00
1 parent b4d07b0b7e
commit 57d009df5c
1 file changed
+4
@@ -8,6 +8,8 @@ public class TrackerUtils {
}
public static <T extends Tracker> T findTrackerForBodyPosition(T[] allTrackers, TrackerPosition position) {
if(position == null)
return null;
for(int i = 0; i < allTrackers.length; ++i) {
T t = allTrackers[i];
if(t != null && t.getBodyPosition() == position)
@@ -17,6 +19,8 @@ public class TrackerUtils {
}
public static <T extends Tracker> T findTrackerForBodyPosition(List<T> allTrackers, TrackerPosition position) {
if(position == null)
return null;
for(int i = 0; i < allTrackers.size(); ++i) {
T t = allTrackers.get(i);
if(t != null && t.getBodyPosition() == position)