Let entities damage people in minigames

This commit is contained in:
Zughy 2023-07-26 23:27:18 +02:00
parent 39217d5578
commit a4565ff120
2 changed files with 33 additions and 33 deletions

View File

@ -16,7 +16,6 @@ function arena_lib.HUD_add(player)
local HUD_BROADCAST_IMG = player:hud_add({
hud_elem_type = "image",
position = { x = 0.5, y = 0.25},
offset = { x = 0, y = 0},
text = "",
scale = { x = 25, y = 2},
number = 0xFFFFFF,
@ -26,9 +25,7 @@ function arena_lib.HUD_add(player)
local HUD_BROADCAST_TXT = player:hud_add({
hud_elem_type = "text",
position = { x = 0.5, y = 0.25},
offset = {x = 0, y = 0},
text = "",
size = { x = 1, y = 1},
number = 0xFFFFFF,
z_index = 1100
})

View File

@ -51,6 +51,9 @@ end)
minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
-- le entità possono far male a prescindere
if not hitter:is_player() then return end
local t_name = player:get_player_name()
local p_name = hitter:get_player_name()
local t_arena = arena_lib.get_arena_by_player(t_name)