убрал наложение ненужного прицела

This commit is contained in:
Vitaliy Olkhin 2024-07-22 16:03:28 +05:00
parent 6a5f4939fc
commit 8f390d3b34
2 changed files with 3 additions and 14 deletions

View File

@ -328,7 +328,7 @@ if math.random(1,100) <= crit+((skill*10)-10) then
moveresult.collisions[1].object:punch(owner, 1.0, {
full_punch_interval = 1.0,
damage_groups = damage,}, nil)
owner:hud_change(hit, "text", hit_texture)
--owner:hud_change(hit, "text", hit_texture)
local bloodyness = tonumber(minetest.settings:get("rangedweapons_bloodyness")) or 10
for i=1,math.random(math.ceil(bloodyness*0.66),math.ceil(bloodyness*1.5)) do

View File

@ -890,7 +890,7 @@ minetest.register_abm({
})
minetest.register_on_joinplayer(function(player)
hit =
--[[hit =
player:hud_add({
hud_elem_type = "image",
text = "rangedweapons_empty_icon.png",
@ -898,7 +898,7 @@ minetest.register_on_joinplayer(function(player)
position = {x = 0.5, y = 0.5},
offset = {x = 0, y = 0},
alignment = {x = 0, y = 0}
})
})]]
scope_hud =
player:hud_add({
hud_elem_type = "image",
@ -908,14 +908,3 @@ scope_hud =
})
end)
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime;
if timer >= 1.0 then
for _, player in pairs(minetest.get_connected_players()) do
player:hud_change(hit, "image", "rangedweapons_empty_icon.png")
timer = 0
end
end
end)