From ee04e06144e3117a4c86c4a7f202a0e4a02dcbf7 Mon Sep 17 00:00:00 2001 From: whosit Date: Mon, 31 May 2021 09:33:58 +0300 Subject: [PATCH] cleanup duplicated check --- init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 47116c3..522b1b5 100644 --- a/init.lua +++ b/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)