When setting the last camera position before a time jump, a boolean has to be passed indicating whether that position should be enforced or ignored if it's out of a reasonable distance from the player's position.
This is used by the GuiMarkerTimeline to ensure that jumping to Marker Keyframes actually results in the Marker Keyframe's Position. The actual code handling Position jumping after Time jumping was moved to the ReplayHandler and is now also called when jumping using the "Please wait" Screen.
This commit is contained in:
@@ -76,7 +76,8 @@ public class GuiKeyframeTimeline extends GuiTimeline {
|
||||
} else if(button == 1) {
|
||||
if(closest != null) {
|
||||
if(closest.getValue() instanceof AdvancedPosition) {
|
||||
ReplayHandler.getCameraEntity().moveAbsolute((AdvancedPosition)closest.getValue());
|
||||
AdvancedPosition pos = (AdvancedPosition)closest.getValue();
|
||||
ReplayHandler.getCameraEntity().movePath(pos);
|
||||
} else if(closest.getValue() instanceof TimestampValue) {
|
||||
ReplayMod.overlay.performJump(((TimestampValue)closest.getValue()).asInt());
|
||||
}
|
||||
|
||||
@@ -66,8 +66,10 @@ public class GuiMarkerTimeline extends GuiTimeline {
|
||||
|
||||
} else if(button == 1) {
|
||||
if(closest != null) {
|
||||
//Jump to clicked Marker Keyframe
|
||||
ReplayHandler.setLastPosition(closest.getValue().getPosition());
|
||||
//Jump to clicked Marker Keyframe (explicitly force to jump to this position)
|
||||
ReplayHandler.setLastPosition(closest.getValue().getPosition(), true);
|
||||
|
||||
//perform the jump, telling the Overlay not to override the last position value
|
||||
ReplayMod.overlay.performJump(closest.getRealTimestamp(), false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user