.tmcpr files are now being deleted upon starting the game

Finally fixed Replay code
Finally fixed Lighting code
This commit is contained in:
Marius Metzger
2015-04-06 16:00:08 +02:00
parent e4d282bffe
commit 66e27a97a4
10 changed files with 103 additions and 68 deletions

View File

@@ -32,6 +32,7 @@ import eu.crushedpixel.replaymod.gui.online.GuiUploadFile;
import eu.crushedpixel.replaymod.gui.replaystudio.GuiReplayStudio;
import eu.crushedpixel.replaymod.gui.replayviewer.GuiReplayViewer;
import eu.crushedpixel.replaymod.online.authentication.AuthenticationHandler;
import eu.crushedpixel.replaymod.registry.LightingHandler;
import eu.crushedpixel.replaymod.registry.ReplayGuiRegistry;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.ReplayProcess;
@@ -200,7 +201,7 @@ public class GuiEventHandler {
event.button.enabled = false;
mc.gameSettings.setOptionFloatValue(Options.GAMMA, ReplayHandler.getInitialGamma());
LightingHandler.setLighting(false);
ReplayHandler.lastExit = System.currentTimeMillis();

View File

@@ -155,8 +155,6 @@ public class GuiReplayOverlay extends Gui {
GlStateManager.resetColor();
this.drawModalRectWithCustomSizedTexture(ppButtonX, ppButtonY, x, y, 20, 20, 64, 64);
//GlStateManager.resetColor();
//When hurrying, no Timeline jumping etc. is possible
if(Mouse.isButtonDown(0) && FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class) && !ReplayHandler.isHurrying()) { //clicking the Button
speedSlider.mousePressed(mc, mouseX, mouseY);
@@ -196,6 +194,11 @@ public class GuiReplayOverlay extends Gui {
}
} else {
/*
if(Mouse.isButtonDown(0) && FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class) && ReplayHandler.isHurrying()) {
System.out.println("HURRYIN'");
}
*/
try {
speedSlider.mouseReleased(mouseX, mouseY);
mouseDown = false;

View File

@@ -23,7 +23,9 @@ import eu.crushedpixel.replaymod.video.ReplayScreenshot;
public class KeyInputHandler {
private Minecraft mc = Minecraft.getMinecraft();
private boolean escDown = false;
@SubscribeEvent
public void onKeyInput(KeyInputEvent event) {
@@ -34,10 +36,12 @@ public class KeyInputHandler {
if(Keyboard.getEventKeyState() && !Keyboard.isRepeatEvent() && Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)
&& ReplayHandler.isInPath() && ReplayProcess.isVideoRecording()
&& mc.currentScreen == null) {
&& mc.currentScreen == null && !escDown) {
mc.displayGuiScreen(new GuiCancelRender());
}
escDown = Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && Keyboard.getEventKeyState();
boolean found = false;
KeyBinding[] keyBindings = Minecraft.getMinecraft().gameSettings.keyBindings;
@@ -103,7 +107,7 @@ public class KeyInputHandler {
SpectateHandler.openSpectateSelection();
}
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_LIGHTING) && kb.isPressed() && !found) {
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_LIGHTING) && kb.isPressed()) {
ReplayMod.replaySettings.setLightingEnabled(!ReplayMod.replaySettings.isLightingEnabled());
}

View File

@@ -4,6 +4,7 @@ import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
@@ -14,6 +15,7 @@ import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import eu.crushedpixel.replaymod.gui.GuiCancelRender;
import eu.crushedpixel.replaymod.reflection.MCPNames;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.ReplayProcess;