aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/falling.lua
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2022-07-14 20:51:42 +0200
committerGitHub <noreply@github.com>2022-07-14 20:51:42 +0200
commitb204655081f495c9d45fdf7d49d203e910dafc7a (patch)
treef130c52ed479eb1ba0f2d5facacdc4f5c7ed64de /builtin/game/falling.lua
parentf4c6ed863d6231e184f1d003b4b3f6e8380e6bba (diff)
downloadminetest-b204655081f495c9d45fdf7d49d203e910dafc7a.tar.gz
minetest-b204655081f495c9d45fdf7d49d203e910dafc7a.tar.bz2
minetest-b204655081f495c9d45fdf7d49d203e910dafc7a.zip
Fix regression & replace more occurrences of vector.new with vector.copy (#12539)
Diffstat (limited to 'builtin/game/falling.lua')
-rw-r--r--builtin/game/falling.lua6
1 files changed, 3 insertions, 3 deletions
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