From b204655081f495c9d45fdf7d49d203e910dafc7a Mon Sep 17 00:00:00 2001 From: Lars Müller <34514239+appgurueu@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:51:42 +0200 Subject: Fix regression & replace more occurrences of vector.new with vector.copy (#12539) --- builtin/game/falling.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin/game/falling.lua') diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua index 29cb56aae..023bd1fa3 100644 --- a/builtin/game/falling.lua +++ b/builtin/game/falling.lua @@ -264,7 +264,7 @@ core.register_entity(":__builtin:falling_node", { end -- Decide if we're replacing the node or placing on top - local np = vector.new(bcp) + local np = vector.copy(bcp) if bcd and bcd.buildable_to and (not self.floats or bcd.liquidtype == "none") then core.remove_node(bcp) @@ -436,7 +436,7 @@ local function drop_attached_node(p) if def and def.preserve_metadata then local oldmeta = core.get_meta(p):to_table().fields -- Copy pos and node because the callback can modify them. - local pos_copy = vector.new(p) + local pos_copy = vector.copy(p) local node_copy = {name=n.name, param1=n.param1, param2=n.param2} local drop_stacks = {} for k, v in pairs(drops) do @@ -461,7 +461,7 @@ end function builtin_shared.check_attached_node(p, n) local def = core.registered_nodes[n.name] - local d = vector.new() + local d = vector.zero() if def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted" then -- The fallback vector here is in case 'wallmounted to dir' is nil due -- cgit v1.2.3