From d8e4b89413997bfa126b254ee8c9d54073fea4ba Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Mon, 13 Jul 2020 17:19:21 +0200 Subject: [PATCH] Fix forge handshake being reordered by MarkerProcessor (fixes #253) For one, the forge handshake takes place *after* login phase (but before the JoinGame packet), so we must ensure that the SquashFilter does not reorder those. Secondly, we were ignoring the initial packet (timestamp = 0) in marker processor when it should have been passed to the SquashFilter. This was not an issue before cause the SquashFilter did not rely on it. Now however the SquashFilter needs to be able to see a login phase packet, so it knows that the following packets till the JoinGame packet are part of the forge handshake. In ReplayStudio: 20b5183 Fix forge handshake being reordered to after the JoinGame packet --- src/main/java/com/replaymod/editor/gui/MarkerProcessor.java | 2 +- versions/common.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/replaymod/editor/gui/MarkerProcessor.java b/src/main/java/com/replaymod/editor/gui/MarkerProcessor.java index e8d77101..072e1f4c 100644 --- a/src/main/java/com/replaymod/editor/gui/MarkerProcessor.java +++ b/src/main/java/com/replaymod/editor/gui/MarkerProcessor.java @@ -163,7 +163,7 @@ public class MarkerProcessor { boolean hasFurtherOutputs = outputFileSuffixes.hasNext(); while (nextPacket != null) { - if (nextMarker != null && nextPacket.getTime() > nextMarker.getTime()) { + if (nextMarker != null && nextPacket.getTime() >= nextMarker.getTime()) { if (MARKER_NAME_START_CUT.equals(nextMarker.getName())) { if (cutFilter != null) { cutFilter.release(); diff --git a/versions/common.gradle b/versions/common.gradle index 620640fe..2fa6b247 100644 --- a/versions/common.gradle +++ b/versions/common.gradle @@ -292,7 +292,7 @@ dependencies { shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8' - shadow "com.github.ReplayMod:ReplayStudio:fc8a66d", shadeExclusions + shadow "com.github.ReplayMod:ReplayStudio:20b5183", shadeExclusions implementation(jGui){ transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those