]> git.lizzy.rs Git - minetest.git/commit
Connected nodes: fix 2 minor bugs
authorAuke Kok <sofar@foo-projects.org>
Sun, 13 Mar 2016 21:25:54 +0000 (14:25 -0700)
committerest31 <MTest31@outlook.com>
Mon, 14 Mar 2016 04:05:04 +0000 (05:05 +0100)
commit5a40a7dad8cbf46320c3b5dd1122808eb4919b62
tree734df3c725f78ecd1379f2ee0d4afcb4359d125c
parent089f9bbe817debc5c30f1d845170909f638c9642
Connected nodes: fix 2 minor bugs

1. Copy-paste error: properly test for back-connection.

In the case of two different connected nodebox types, we want to
assure that if A connects to B, that B also connects to A. This test
was accidentally not implemented correctly.

2. Clear the connects_to_ids before deserializing.

With each new connected node, the deserialization code added more
and more targets to the map, since the map wasn't cleared in between
deserialization steps. This caused e.g. wall blocks to connect to
things in the fence connects_to map.
src/nodedef.cpp