From 893bfce767cdfa39e553639c26adfbc34cf7aa5e Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 20 Sep 2018 17:14:03 -0400 Subject: [PATCH] Incorrect conveyor movement transitions --- .../world/blocks/distribution/Conveyor.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index 7a6959a99f..d6d5ed8c5f 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -231,6 +231,21 @@ public class Conveyor extends Block{ pos.y = Mathf.clamp(pos.y); if(pos.y >= 0.9999f && offloadDir(tile, pos.item)){ + Tile next = tile.getNearby(tile.getRotation()); + if(next.block() instanceof Conveyor){ + ConveyorEntity othere = next.entity(); + + ItemPos ni = pos2.set(othere.convey.first(), ItemPos.updateShorts); + + if(Mathf.mod(next.getRotation() - tile.getRotation(), 2) == 0){ + ni.x = pos.x; + }else if((tile.getRotation() + 1) % 4 == next.getRotation()){ + ni.y = (pos.x + 1f)/2f; + }else{ + ni.y = 1f-(pos.x + 1f)/2f; + } + othere.convey.set(0, ni.pack()); + } minremove = Math.min(i, minremove); tile.entity.items.remove(pos.item, 1); }else{