Add match player island waypoint

stop match players getting lost by adding a coloured waypoint to their HUD
master
shivajiva101 2020-09-22 19:25:04 +01:00 committed by GitHub
parent 12b4b0bb92
commit ef5293a9a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -254,6 +254,7 @@ local function remove_player_hud(name)
end
obj:hud_remove(def.remaining)
obj:hud_remove(def.pil)
obj:hud_remove(def.waypoint)
end
--- Remove match status flags from players HUD
@ -820,6 +821,16 @@ eggwars.begin_match = function ()
minetest.set_player_privs(name, {interact = true, shout = true})
if eggwars.playertag then playertag.set(player, 1, def.cs[id][2]) end
-- Add home waypoint
sp.y = sp.y - 4
match.player[name].waypoint = player:hud_add({
hud_elem_type = "waypoint",
name = 'Home',
text = "m",
number = def.cs[id][4],
world_pos = sp,
})
end
-- Diamond spawners