cleanup duplicated check
This commit is contained in:
parent
393ef6a80b
commit
ee04e06144
4
init.lua
4
init.lua
@ -301,9 +301,7 @@ local function compass_use_callback(itemstack, user, pointed_thing)
|
|||||||
end
|
end
|
||||||
if user:get_player_control()["sneak"] then
|
if user:get_player_control()["sneak"] then
|
||||||
if pointed_thing.type == "nothing" then
|
if pointed_thing.type == "nothing" then
|
||||||
if user and user:is_player() then
|
pointed_thing = waypoint_lib.raycast_crosshair(user, COMPASS_RANGE, POINT_TO_OBJECTS, POINT_TO_LIQUIDS)
|
||||||
pointed_thing = waypoint_lib.raycast_crosshair(user, COMPASS_RANGE, POINT_TO_OBJECTS, POINT_TO_LIQUIDS)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
set_waypoint_at_pointed_place(itemstack, pointed_thing)
|
set_waypoint_at_pointed_place(itemstack, pointed_thing)
|
||||||
update_hud_waypoint(user, itemstack)
|
update_hud_waypoint(user, itemstack)
|
||||||
|
Loading…
Reference in New Issue
Block a user