From fe4b4a695af2df5a9c0c43efb9255bbdbf783a12 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 17 Oct 2018 21:02:43 +0200 Subject: Fix node database ATC rail bug After successfully registering newly-placed ATC rails in the nodedb, the rail's after_place_node() callback (local apn_func()) immediately cleared it again by passing a "node" object that was actually a player object and thus had no "name" or "param2" to ndb.update(), which it handled how it should not in this situation. Since those ndb.update calls were unnecessary anyways, I removed them completely. --- advtrains/atc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'advtrains/atc.lua') diff --git a/advtrains/atc.lua b/advtrains/atc.lua index b00849d..40809d2 100644 --- a/advtrains/atc.lua +++ b/advtrains/atc.lua @@ -78,8 +78,8 @@ end --nodes local idxtrans={static=1, mesecon=2, digiline=3} -local apn_func=function(pos, node) - advtrains.ndb.update(pos, node) +local apn_func=function(pos) + -- FIX for long-persisting ndb bug: there's no node in parameter 2 of this function! local meta=minetest.get_meta(pos) if meta then meta:set_string("infotext", attrans("ATC controller, unconfigured.")) -- cgit v1.2.3