GuiObjectManager now allows users to set Keyframes for Transformations
Fixed a bug in KeyframeList#getClosestKeyframeForTimestamp that made it only work with AdvancedPosition Keyframes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package eu.crushedpixel.replaymod.interpolation;
|
||||
|
||||
import eu.crushedpixel.replaymod.holders.AdvancedPosition;
|
||||
import eu.crushedpixel.replaymod.holders.Keyframe;
|
||||
import eu.crushedpixel.replaymod.holders.KeyframeComparator;
|
||||
|
||||
@@ -108,7 +107,6 @@ public class KeyframeList<K extends KeyframeValue> extends ArrayList<Keyframe<K>
|
||||
public Keyframe<K> getClosestKeyframeForTimestamp(int realTime, int tolerance) {
|
||||
List<Keyframe<K>> found = new ArrayList<Keyframe<K>>();
|
||||
for(Keyframe<K> kf : this) {
|
||||
if(!(kf.getValue() instanceof AdvancedPosition)) continue;
|
||||
if(Math.abs(kf.getRealTimestamp() - realTime) <= tolerance) {
|
||||
found.add(kf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user