1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-06 09:34:05 +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

@ -14,6 +14,7 @@ export const CHANGELOG = [
"Updated the soundtrack again, it is now 20 minutes in total!",
"Updated and added new translations (Thanks to all contributors!)",
"Show confirmation when cutting area which is too expensive to get pasted again (by isaisstillalive)",
"Fix tunnels entrances connecting to exits sometimes when they shouldn't",
],
},
{

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 };
}