summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPilzAdam <adam-k@outlook.com>2012-09-25 16:36:48 +0200
committerPilzAdam <adam-k@outlook.com>2012-09-25 16:36:48 +0200
commita0c49e7677853ec596ae084212b820b315c70b05 (patch)
tree59d390a3f716450f01f85ebc9f4d5d39be69ed3b
parent8caffae1e3c54882c364af1404815ecff40099ae (diff)
Bugfix
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 2988232..6f69cad 100644
--- a/init.lua
+++ b/init.lua
@@ -82,6 +82,9 @@ minetest.register_entity(":__builtin:item", {
if not time then
time = 300
end
+ if not self.timer then
+ self.timer = 0
+ end
self.timer = self.timer + dtime
if (self.timer > time) then
self.object:remove()