remove WTF after() crash server(mod profiler), register is allowed only on starting mod
parent
27a9f5b747
commit
859d94dd3c
|
@ -64,21 +64,15 @@ local function count_items()
|
||||||
minetest.log("action", "There are " .. number .. " registered nodes, items and tools.")
|
minetest.log("action", "There are " .. number .. " registered nodes, items and tools.")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function player_join_sounds()
|
minetest.register_on_joinplayer(function()
|
||||||
minetest.register_on_joinplayer(function()
|
minetest.sound_play("player_join", {gain = 0.75})
|
||||||
minetest.sound_play("player_join", {gain = 0.75})
|
end)
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function player_leave_sounds()
|
minetest.register_on_leaveplayer(function()
|
||||||
minetest.register_on_leaveplayer(function()
|
minetest.sound_play("player_leave", {gain = 1})
|
||||||
minetest.sound_play("player_leave", {gain = 1})
|
end)
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.after(1, count_items)
|
minetest.after(1, count_items)
|
||||||
minetest.after(5, player_join_sounds)
|
|
||||||
minetest.after(5, player_leave_sounds)
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
Loading…
Reference in New Issue