[hg_player] Change clouds height when teleporting on a map

master
upsilon 2019-08-16 18:39:11 +02:00
parent ec23366bc3
commit a7797b67d8
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
1 changed files with 10 additions and 0 deletions

View File

@ -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"}, {