1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Fix tunnels entrances connecting to exits sometimes when they shouldn't

This commit is contained in:
tobspr
2020-07-06 14:19:46 +02:00
parent ef8d520d94
commit 756bcdb473
2 changed files with 6 additions and 5 deletions

View File

@@ -309,17 +309,17 @@ export class UndergroundBeltSystem extends GameSystemWithFilter {
continue;
}
if (receiverUndergroundComp.mode !== enumUndergroundBeltMode.receiver) {
// Not a receiver
continue;
}
const receiverStaticComp = potentialReceiver.components.StaticMapEntity;
if (receiverStaticComp.rotation !== targetRotation) {
// Wrong rotation
continue;
}
if (receiverUndergroundComp.mode !== enumUndergroundBeltMode.receiver) {
// Not a receiver, but a sender -> Abort to make sure we don't deliver double
break;
}
return { entity: potentialReceiver, distance: searchOffset };
}