Hide rotation hud while sneaking

This commit is contained in:
Aaron Suen 2024-09-20 06:12:59 -04:00
parent 1d28f82e3c
commit 32c9833ee6

View File

@ -70,6 +70,15 @@ end
nodecore.register_playerstep({ nodecore.register_playerstep({
label = "rotation scan", label = "rotation scan",
action = function(player, data) action = function(player, data)
if player:get_player_control().sneak then
huddots(player)
return nodecore.hud_set(player, {
label = modname,
ttl = 0,
quick = true
})
end
local pt = data.raycast() local pt = data.raycast()
local _, _, rot = nodecore.rotation_compute(player, pt) local _, _, rot = nodecore.rotation_compute(player, pt)