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

@@ -13,7 +13,6 @@ import eu.crushedpixel.replaymod.registry.ReplayGuiRegistry;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.ReplayProcess;
import eu.crushedpixel.replaymod.studio.VersionValidator;
import eu.crushedpixel.replaymod.timer.MCTimerHandler;
import eu.crushedpixel.replaymod.utils.MouseUtils;
import eu.crushedpixel.replaymod.utils.ReplayFileIO;
import net.minecraft.client.Minecraft;
@@ -51,7 +50,7 @@ public class GuiEventHandler {
}
} else {
try {
MCTimerHandler.setTimerSpeed(1);
mc.timer.timerSpeed = 1;
} catch(Exception e) {
e.printStackTrace();
}

View File

@@ -56,10 +56,6 @@ public class TickAndRenderListener {
if(ReplayHandler.isInPath()) ReplayProcess.unblockAndTick(false);
if(ReplayHandler.isCamera()) ReplayHandler.setCameraEntity(ReplayHandler.getCameraEntity());
if(ReplayHandler.isInReplay() && ReplayMod.replaySender.paused()) {
if(mc != null && mc.thePlayer != null)
MinecraftTicker.runMouseKeyboardTick(mc);
}
if((mc.getRenderViewEntity() == mc.thePlayer || !mc.getRenderViewEntity().isEntityAlive())
&& ReplayHandler.getCameraEntity() != null && !ReplayHandler.isInPath()) {
ReplayHandler.spectateCamera();