fix a null position component bug
This commit is contained in:
@@ -35,11 +35,12 @@
|
||||
(when _playgroundKey
|
||||
(super.process archive ui)
|
||||
(doFor e (entries.iterator)
|
||||
(let [pos (dictGet (readComponent e Positions) _playgroundKey)]
|
||||
(doFor =>e2id _ (readComponentOr e Connections (new Map<String,Int>))
|
||||
(whenLet [e2 (dictGet archive.entries e2id)
|
||||
pos2 (dictGet (readComponent e2 Positions) _playgroundKey)]
|
||||
(connectionProcessor archive e pos e2 pos2 ui)))))))
|
||||
(when (hasComponent e Positions)
|
||||
(let [pos (dictGet (readComponent e Positions) _playgroundKey)]
|
||||
(doFor =>e2id _ (readComponentOr e Connections (new Map<String,Int>))
|
||||
(whenLet [e2 (dictGet archive.entries e2id)
|
||||
pos2 (dictGet (readComponent e2 Positions) _playgroundKey)]
|
||||
(connectionProcessor archive e pos e2 pos2 ui))))))))
|
||||
|
||||
(method defaultPosition [:Entry e]
|
||||
(object x 0.0 y 0.0 z 0.0))
|
||||
|
Reference in New Issue
Block a user