BUG FIXED: not allowed types to attach

This commit is contained in:
Luis Fernando Molina committed 2019-05-23 09:59:58 +02:00
1 parent c1b7da23d4
commit cd71abcf2e
1 file changed
+3
+3
View File
@@ -182,6 +182,8 @@ function newStrategyPart () {
compatibleType = 'Situation'
compatibleSubType = undefined
break
default:
return
}
let foundCompatible = false
attachToNode = undefined
@@ -193,6 +195,7 @@ function newStrategyPart () {
let floatingObject = nearby[1]
let nearbyNode = floatingObject.payload.node
if (compatibleType.indexOf(nearbyNode.type) >= 0) {
if (thisObject.payload.node.type === 'Phase' && nearbyNode.type === 'Phase' && nearbyNode.payload.parentNode === undefined) { continue }
if (foundCompatible === false) {
if (distance < thisObject.container.frame.radius * 1.5 + floatingObject.container.frame.radius * 1.5) {
nearbyNode.payload.uiObject.getReadyToAttach()