From 0c39f34ebb905160fb990b6b0c20beefdba77377 Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Sat, 11 Jan 2020 00:34:13 -0500 Subject: [PATCH] Fix falling_node rapid column settling. --- mods/nc_api_ents/api.lua | 4 ++-- mods/nc_api_ents/falling_ent.lua | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mods/nc_api_ents/api.lua b/mods/nc_api_ents/api.lua index 8afa6555..6f43d042 100644 --- a/mods/nc_api_ents/api.lua +++ b/mods/nc_api_ents/api.lua @@ -78,11 +78,11 @@ local function collides(pos) if def.walkable then return node end end -function nodecore.entity_settle_check(on_settle) +function nodecore.entity_settle_check(on_settle, isnode) return function(self) local pos = self.object:get_pos() local yvel = self.object:get_velocity().y - local coll = self.not_rising and yvel == 0 + local coll = (isnode or self.not_rising and yvel == 0) and collides({x = pos.x, y = pos.y - 0.75, z = pos.z}) self.not_rising = yvel <= 0 if not coll then diff --git a/mods/nc_api_ents/falling_ent.lua b/mods/nc_api_ents/falling_ent.lua index a761d13d..961cc7a3 100644 --- a/mods/nc_api_ents/falling_ent.lua +++ b/mods/nc_api_ents/falling_ent.lua @@ -102,7 +102,8 @@ minetest.register_entity(":__builtin:falling_node", { self.object:remove() return true - end), + end, + true), on_step = function(self, ...) if not self.node then return self.object:remove() end