Fix crash on exit of replay (no longer processing clicks mid-rendering) and OpenGL error warnings

Remove MCTimerHandler, instead always install the ReplayTimer
This commit is contained in:
johni0702
2015-06-16 19:33:34 +02:00
parent 8d61bfbfa8
commit b0f253538c
10 changed files with 71 additions and 131 deletions

View File

@@ -8,7 +8,6 @@ import eu.crushedpixel.replaymod.entities.CameraEntity;
import eu.crushedpixel.replaymod.events.handlers.RecordingHandler;
import eu.crushedpixel.replaymod.holders.PacketData;
import eu.crushedpixel.replaymod.holders.Position;
import eu.crushedpixel.replaymod.timer.MCTimerHandler;
import eu.crushedpixel.replaymod.utils.ReplayFile;
import eu.crushedpixel.replaymod.utils.ReplayFileIO;
import io.netty.channel.ChannelHandler.Sharable;
@@ -422,7 +421,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
* @return {@code true} if it is paused, {@code false} otherwise
*/
public boolean paused() {
return MCTimerHandler.getTimerSpeed() == 0;
return mc.timer.timerSpeed == 0;
}
/**
@@ -442,7 +441,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
*/
public void setReplaySpeed(final double d) {
if(d != 0) this.replaySpeed = d;
MCTimerHandler.setTimerSpeed((float) d);
mc.timer.timerSpeed = (float) d;
}
/////////////////////////////////////////////////////////