From b0c4486b7cd5d241a4880ca6af1a510501123030 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 8 Jun 2022 11:01:28 -0400 Subject: [PATCH] Fixed #6874 --- .../world/blocks/payloads/PayloadRouter.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/payloads/PayloadRouter.java b/core/src/mindustry/world/blocks/payloads/PayloadRouter.java index 9fa5778c18..a782457112 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadRouter.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadRouter.java @@ -89,6 +89,8 @@ public class PayloadRouter extends PayloadConveyor{ //"accept from self" conditions are for dropped payloads and are less restrictive }while((blocked || next == null || !next.acceptPayload(next, item)) && ++rotations < 4); } + }else{ + onProximityUpdate(); } } @@ -96,15 +98,20 @@ public class PayloadRouter extends PayloadConveyor{ public void control(LAccess type, double p1, double p2, double p3, double p4){ super.control(type, p1, p2, p3, p4); if(type == LAccess.config){ + int prev = rotation; rotation = (int)p1; //when manually controlled, routers do not turn automatically for a while, same as turrets controlTime = 60f * 6f; + if(prev != (int)p1){ + onProximityUpdate(); + } } } @Override public void onControlSelect(Unit player){ super.onControlSelect(player); + //this will immediately snap back if logic controlled recDir = rotation; checkMatch(); } @@ -112,7 +119,9 @@ public class PayloadRouter extends PayloadConveyor{ @Override public void handlePayload(Building source, Payload payload){ super.handlePayload(source, payload); - recDir = source == null ? rotation : source.relativeTo(this); + if(controlTime < 0f){ //don't overwrite logic recDir + recDir = source == null ? rotation : source.relativeTo(this); + } checkMatch(); pickNext(); }