From 182d8e2daf90063be43d246f89eacd0d376c7dbf Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 6 Jun 2020 12:55:21 -0400 Subject: [PATCH] Bugfixes --- core/src/mindustry/core/Renderer.java | 2 +- core/src/mindustry/graphics/Pixelator.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/core/Renderer.java b/core/src/mindustry/core/Renderer.java index 4a7b6e64ae..612131cf0e 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -288,7 +288,7 @@ public class Renderer implements ApplicationListener{ } public void scaleCamera(float amount){ - targetscale += amount; + targetscale *= (amount / 4) + 1; clampScale(); } diff --git a/core/src/mindustry/graphics/Pixelator.java b/core/src/mindustry/graphics/Pixelator.java index ea976e2e9f..67dc58dd7d 100644 --- a/core/src/mindustry/graphics/Pixelator.java +++ b/core/src/mindustry/graphics/Pixelator.java @@ -26,8 +26,6 @@ public class Pixelator implements Disposable{ camera.width = (int)camera.width; camera.height = (int)camera.height; - graphics.clear(0f, 0f, 0f, 1f); - px = Core.camera.position.x; py = Core.camera.position.y; Core.camera.position.set((int)px + ((int)(camera.width) % 2 == 0 ? 0 : 0.5f), (int)py + ((int)(camera.height) % 2 == 0 ? 0 : 0.5f)); @@ -37,7 +35,7 @@ public class Pixelator implements Disposable{ buffer.resize(w, h); - buffer.begin(); + buffer.begin(Color.clear); renderer.draw(); }