use meta data first for the case the node is unloaded

This commit is contained in:
Joachim Stolberg 2017-08-11 18:17:57 +02:00
parent f999788516
commit 352c160b5e

View File

@ -39,8 +39,6 @@ function hyperloop.scan_neighbours(pos)
npos = vector.add(pos, dir)
-- check meta data first for the case the node is not loaded
local peer = minetest.get_meta(npos):get_string("peer")
--local peer = ""----------------------------------------------
print(dump(peer))-----------------------
-- tube1 block available?
if peer ~= "" and peer ~= minetest.pos_to_string(npos) then
node = {pos=npos, name="hyperloop:tube1"}