1
0
mirror of https://github.com/HybridDog/builtin_item.git synced 2024-12-23 01:10:26 +01:00
This commit is contained in:
HybridDog 2016-02-21 12:31:33 +01:00
parent 72f75d0417
commit bd97071dc6

View File

@ -104,9 +104,16 @@ local item_entity = minetest.registered_entities["__builtin:item"]
local old_on_step = item_entity.on_step or function()end local old_on_step = item_entity.on_step or function()end
item_entity.makes_footstep_sound = true item_entity.makes_footstep_sound = true
item_entity.bt_timer = 0
item_entity.on_step = function(self, dtime) item_entity.on_step = function(self, dtime)
old_on_step(self, dtime) old_on_step(self, dtime)
self.bt_timer = self.bt_timer+dtime
if self.bt_timer < 1 then
return
end
self.bt_timer = 0
local p = self.object:getpos() local p = self.object:getpos()
local name = minetest.get_node(p).name local name = minetest.get_node(p).name