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:
CrushedPixel
2015-07-30 11:29:45 +02:00
parent e0a0d9ef53
commit 7bc3574515
5 changed files with 32 additions and 14 deletions

View File

@@ -540,14 +540,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
if (isHurrying() && lastTimeStamp > desiredTimeStamp && !startFromBeginning) {
desiredTimeStamp = -1;
AdvancedPosition pos = ReplayHandler.getLastPosition();
CameraEntity cam = ReplayHandler.getCameraEntity();
if (cam != null && pos != null) {
// Move camera back in case we have been respawned
if (Math.abs(pos.getX() - cam.posX) < ReplayMod.TP_DISTANCE_LIMIT && Math.abs(pos.getZ() - cam.posZ) < ReplayMod.TP_DISTANCE_LIMIT) {
cam.moveAbsolute(pos);
}
}
ReplayHandler.moveCameraToLastPosition();
// Pause after jumping
setReplaySpeed(0);