forked from VoxeLibre/VoxeLibre
Used vector.offset instead of add/subtract
This commit is contained in:
parent
0c48a46f7c
commit
23468cc2dd
|
@ -42,7 +42,7 @@ end
|
|||
---@param ladder integer The param2 value of the ladder.
|
||||
---@param event "place" | "destruct" The place or destruct event.
|
||||
local function update_trapdoor(pos, ladder, event)
|
||||
local top_pos = vector.add(pos, { x = 0, y = 1, z = 0 })
|
||||
local top_pos = vector.offset(pos, 0, 1, 0)
|
||||
local top_node = minetest.get_node_or_nil(top_pos)
|
||||
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ function mcl_doors:register_trapdoor(name, def)
|
|||
else
|
||||
minetest.sound_play(def.sound_open, { pos = pos, gain = 0.3, max_hear_distance = 16 }, true)
|
||||
|
||||
local bottom_node = minetest.get_node_or_nil(vector.subtract(pos, { x = 0, y = 1, z = 0 }))
|
||||
local bottom_node = minetest.get_node_or_nil(vector.offset(pos, 0, -1, 0))
|
||||
local name_end = "_open"
|
||||
|
||||
-- Checking if there is something underneath the trapdoor
|
||||
|
|
Loading…
Reference in New Issue