diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index 68532002dc..d266e5cb9a 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -157,16 +157,20 @@ public class Conveyor extends Block implements Autotiler{ Draw.rect(regions[blendbits][frame], x, y, tilesize * blendsclx, tilesize * blendscly, rotation * 90); Draw.z(Layer.block - 0.1f); + float layer = Layer.block - 0.1f, wwidth = world.unitWidth(), wheight = world.unitHeight(), scaling = 0.01f; for(int i = 0; i < len; i++){ Item item = ids[i]; Tmp.v1.trns(rotation * 90, tilesize, 0); Tmp.v2.trns(rotation * 90, -tilesize / 2f, xs[i] * tilesize / 2f); - Draw.rect(item.fullIcon, - (x + Tmp.v1.x * ys[i] + Tmp.v2.x), - (y + Tmp.v1.y * ys[i] + Tmp.v2.y), - itemSize, itemSize); + float + ix = (x + Tmp.v1.x * ys[i] + Tmp.v2.x), + iy = (y + Tmp.v1.y * ys[i] + Tmp.v2.y); + + //keep draw position deterministic. + Draw.z(layer + (ix / wwidth + iy / wheight) * scaling); + Draw.rect(item.fullIcon, ix, iy, itemSize, itemSize); } }