mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix belt path optimization
This commit is contained in:
parent
c41aaa1fc5
commit
3ad502c5a7
@ -1476,7 +1476,11 @@ export class BeltPath extends BasicSerializableObject {
|
|||||||
if (drawStack.length > 1) {
|
if (drawStack.length > 1) {
|
||||||
// Check if we can append to the stack, since its already a stack of two same items
|
// Check if we can append to the stack, since its already a stack of two same items
|
||||||
const referenceItem = drawStack[0];
|
const referenceItem = drawStack[0];
|
||||||
if (Math.abs(referenceItem[0][drawStackProp] - worldPos[drawStackProp]) < 0.001) {
|
|
||||||
|
if (
|
||||||
|
referenceItem[1].equals(item) &&
|
||||||
|
Math.abs(referenceItem[0][drawStackProp] - worldPos[drawStackProp]) < 0.001
|
||||||
|
) {
|
||||||
// Will continue stack
|
// Will continue stack
|
||||||
} else {
|
} else {
|
||||||
// Start a new stack, since item doesn't follow in row
|
// Start a new stack, since item doesn't follow in row
|
||||||
|
Loading…
Reference in New Issue
Block a user