[hg_player] Change clouds height when teleporting on a map
parent
ec23366bc3
commit
a7797b67d8
|
@ -44,6 +44,11 @@ hg_match.register_on_new_player(function(name)
|
|||
|
||||
-- Clear inventory
|
||||
clear_inventory(player)
|
||||
|
||||
-- Set clouds height
|
||||
player:set_clouds({
|
||||
height = hg_map.spawn.maxp.y
|
||||
})
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
|
@ -107,6 +112,11 @@ hg_match.register_on_new_game(function(map, players)
|
|||
vector.new(0, 1, 0)))
|
||||
table.remove(spawnpoints, sp_i)
|
||||
|
||||
-- Set clouds height
|
||||
player:set_clouds({
|
||||
height = map.maxp.y
|
||||
})
|
||||
|
||||
-- Announce
|
||||
minetest.chat_send_player(name, string.format("Welcome to map %s made by @%s!", map.name, map.author))
|
||||
minetest.sound_play({name = "hg_player_match_start"}, {
|
||||
|
|
Loading…
Reference in New Issue