mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Update get_pointed_thing function
This commit is contained in:
parent
d46a96c43a
commit
8db28c1337
1 changed files with 2 additions and 2 deletions
|
@ -572,11 +572,11 @@ function mcl_util.replace_mob(obj, mob)
|
|||
return obj
|
||||
end
|
||||
|
||||
function mcl_util.get_pointed_thing(player)
|
||||
function mcl_util.get_pointed_thing(player, liquid)
|
||||
local pos = vector.offset(player:get_pos(), 0, player:get_properties().eye_height, 0)
|
||||
local look_dir = vector.multiply(player:get_look_dir(), 5)
|
||||
local pos2 = vector.add(pos, look_dir)
|
||||
local ray = minetest.raycast(pos, pos2, false, true)
|
||||
local ray = minetest.raycast(pos, pos2, false, liquid)
|
||||
|
||||
if ray then
|
||||
for pointed_thing in ray do
|
||||
|
|
Loading…
Reference in a new issue