diff --git a/core/src/mindustry/core/Renderer.java b/core/src/mindustry/core/Renderer.java index 9738ce1133..7085c18166 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -355,7 +355,12 @@ public class Renderer implements ApplicationListener{ Tmp.tr1.u2 = size; Tmp.tr1.v2 = size / ratio; - float sx = (camera.position.x) / state.rules.backgroundSpeed, sy = (camera.position.y) / state.rules.backgroundSpeed; + float sx = 0f, sy = 0f; + + if(!Mathf.zero(state.rules.backgroundSpeed)){ + sx = (camera.position.x) / state.rules.backgroundSpeed; + sy = (camera.position.y) / state.rules.backgroundSpeed; + } Tmp.tr1.scroll(sx + state.rules.backgroundOffsetX, -sy + state.rules.backgroundOffsetY); diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index c9edb5722b..af7d4eda13 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -126,7 +126,7 @@ public class Rules{ public @Nullable String customBackgroundCallback; /** path to background texture with extension (e.g. "sprites/space.png")*/ public @Nullable String backgroundTexture; - /** background texture move speed scaling - bigger numbers mean slower movement */ + /** background texture move speed scaling - bigger numbers mean slower movement. 0 to disable. */ public float backgroundSpeed = 27000f; /** background texture scaling factor */ public float backgroundScl = 1f;