forked from whosit/waypoint_compass
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
|
||||
if user:get_player_control()["sneak"] 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)
|
||||
end
|
||||
pointed_thing = waypoint_lib.raycast_crosshair(user, COMPASS_RANGE, POINT_TO_OBJECTS, POINT_TO_LIQUIDS)
|
||||
end
|
||||
set_waypoint_at_pointed_place(itemstack, pointed_thing)
|
||||
update_hud_waypoint(user, itemstack)
|
||||
|
Loading…
Reference in New Issue
Block a user