raycast_polyfill: ignore wielded_light:* nodes.
.....this means that despite this being a polyfill, we now can't replace it with the Minetest built-in version. We'd have to benchmark - I'm not actually sure which is faster. On the 1 hand, Minetest.raycast() is a C++ call and staying in Lua gives us an advantage, but on the other hand Lua might be that much slower than C++ that it's worth the hit of making an extra API call.master
parent
5b3842a9ae
commit
7df26a2cc7
|
@ -64,7 +64,7 @@ local function handle_rotation_player(player)
|
|||
local rotation = player:get_look_horizontal()
|
||||
local old_rotation = worldedit_hud_helper.info[player_name].rotation
|
||||
|
||||
-- Bad practice! Lua doesn't have a contineu statement though (O.o),
|
||||
-- Bad practice! Lua doesn't have a continue statement though (O.o),
|
||||
-- so we've got to make do :-/
|
||||
if rotation ~= old_rotation then
|
||||
local rotation_text = calc_rotation_text(rotation)
|
||||
|
|
|
@ -15,7 +15,7 @@ function worldedit_hud_helper.raycast(player)
|
|||
|
||||
local node_name
|
||||
node_name = minetest.get_node(cur_pos).name
|
||||
if node_name ~= "air" and node_name ~= "ignore" then
|
||||
if node_name ~= "air" and node_name ~= "ignore" and not string.match(node_name, "wielded_light:") then
|
||||
return node_name
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue