When clicking Time/Marker Keyframes, the time is now traveled with the "Please wait" screen
This commit is contained in:
@@ -78,7 +78,7 @@ public class GuiKeyframeTimeline extends GuiTimeline {
|
|||||||
if(closest.getValue() instanceof AdvancedPosition) {
|
if(closest.getValue() instanceof AdvancedPosition) {
|
||||||
ReplayHandler.getCameraEntity().moveAbsolute((AdvancedPosition)closest.getValue());
|
ReplayHandler.getCameraEntity().moveAbsolute((AdvancedPosition)closest.getValue());
|
||||||
} else if(closest.getValue() instanceof TimestampValue) {
|
} else if(closest.getValue() instanceof TimestampValue) {
|
||||||
ReplayMod.replaySender.jumpToTime(((TimestampValue)closest.getValue()).asInt());
|
ReplayMod.overlay.performJump(((TimestampValue)closest.getValue()).asInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class GuiMarkerTimeline extends GuiTimeline {
|
|||||||
if(closest != null) {
|
if(closest != null) {
|
||||||
//Jump to clicked Marker Keyframe
|
//Jump to clicked Marker Keyframe
|
||||||
ReplayHandler.setLastPosition(closest.getValue().getPosition());
|
ReplayHandler.setLastPosition(closest.getValue().getPosition());
|
||||||
ReplayMod.replaySender.jumpToTime(closest.getRealTimestamp());
|
ReplayMod.overlay.performJump(closest.getRealTimestamp(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -436,6 +436,10 @@ public class GuiReplayOverlay extends Gui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void performJump(long timelineTime) {
|
public void performJump(long timelineTime) {
|
||||||
|
performJump(timelineTime, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void performJump(long timelineTime, boolean setLastPosition) {
|
||||||
if (timelineTime != -1) { // Click on timeline
|
if (timelineTime != -1) { // Click on timeline
|
||||||
//When hurrying, no Timeline jumping etc. is possible
|
//When hurrying, no Timeline jumping etc. is possible
|
||||||
if(!ReplayMod.replaySender.isHurrying()) {
|
if(!ReplayMod.replaySender.isHurrying()) {
|
||||||
@@ -443,11 +447,13 @@ public class GuiReplayOverlay extends Gui {
|
|||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraEntity cam = ReplayHandler.getCameraEntity();
|
if(setLastPosition) {
|
||||||
if(cam != null) {
|
CameraEntity cam = ReplayHandler.getCameraEntity();
|
||||||
ReplayHandler.setLastPosition(new AdvancedPosition(cam.posX, cam.posY, cam.posZ, cam.rotationPitch, cam.rotationYaw));
|
if(cam != null) {
|
||||||
} else {
|
ReplayHandler.setLastPosition(new AdvancedPosition(cam.posX, cam.posY, cam.posZ, cam.rotationPitch, cam.rotationYaw));
|
||||||
ReplayHandler.setLastPosition(null);
|
} else {
|
||||||
|
ReplayHandler.setLastPosition(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long diff = timelineTime - ReplayMod.replaySender.getDesiredTimestamp();
|
long diff = timelineTime - ReplayMod.replaySender.getDesiredTimestamp();
|
||||||
|
|||||||
Reference in New Issue
Block a user