Fixed chat studder
This commit is contained in:
parent
c8221f94a1
commit
153cf0f204
5
init.lua
5
init.lua
@ -2,6 +2,7 @@ local block_sounds = {}
|
|||||||
local player_name = {}
|
local player_name = {}
|
||||||
local handler = {}
|
local handler = {}
|
||||||
local sound = {}
|
local sound = {}
|
||||||
|
local chats = {}
|
||||||
|
|
||||||
minetest.register_node("mysoundblocks:block", {
|
minetest.register_node("mysoundblocks:block", {
|
||||||
description = "Sound Block",
|
description = "Sound Block",
|
||||||
@ -264,9 +265,11 @@ end
|
|||||||
|
|
||||||
-- display text
|
-- display text
|
||||||
if (sound_chat == "chat" or sound_chat == "both")
|
if (sound_chat == "chat" or sound_chat == "both")
|
||||||
and block_text then
|
and block_text
|
||||||
|
and block_text ~= chats[p] then
|
||||||
|
|
||||||
minetest.chat_send_player(p, block_text)
|
minetest.chat_send_player(p, block_text)
|
||||||
|
chats[p] = block_text
|
||||||
end
|
end
|
||||||
|
|
||||||
-- play sound
|
-- play sound
|
||||||
|
Loading…
x
Reference in New Issue
Block a user