Merge branch 'spectate_ball' into 'master'
Possibility to spectate the ball instead of players Closes #54 See merge request zughy-friends-minetest/block_league!18
This commit is contained in:
commit
fed5577151
@ -142,7 +142,9 @@ arena_lib.on_change_spectated_target("block_league", function(arena, sp_name, ta
|
||||
if type(target) ~= "string" then return end
|
||||
-- ritardo di 0.1 perché on_join non è ancora stato chiamato, quindi non hanno ancora la HUD
|
||||
minetest.after(0.1, function()
|
||||
if minetest.is_player(target) and target:get_hp() <= 0 then
|
||||
block_league.HUD_energy_update(arena, target)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
|
@ -62,6 +62,8 @@ function ball:on_activate(staticdata, d_time)
|
||||
return
|
||||
end
|
||||
|
||||
arena_lib.add_spectable_target("block_league", arena.name, "entity", "Ball", self)
|
||||
|
||||
self.w_name = nil
|
||||
self.timer_bool = false
|
||||
self.team_id = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user