summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2014-07-06 16:07:00 +0200
committerWuzzy <almikes@aol.com>2014-07-06 16:07:00 +0200
commitb6b3ac82ce5d345d736028f9043e2383a6c8dca1 (patch)
treee9e8c5da4ccaab39e249fc64d681bf84bd2eecf5 /init.lua
parent4c1d480f82986ff329fdbbde95320358e2f93bd5 (diff)
on_joinplayer workaround
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index cadfdac..7a87dc0 100644
--- a/init.lua
+++ b/init.lua
@@ -147,21 +147,22 @@ end)
minetest.register_on_joinplayer(function(player)
+ minetest.after(0, playereffects.join0, player)
+end)
+
+function playereffects.join0(player)
local playername = player:get_player_name()
-- load all the effects again (if any)
if(playereffects.inactive_effects[playername] ~= nil) then
for i=1,#playereffects.inactive_effects[playername] do
local effect = playereffects.inactive_effects[playername][i]
--- minetest.after(0, function(effect, player)
--- playereffects.apply_effect_type(effect.effect_type_id, effect.time_left, player) end,
--- effect, player)
playereffects.apply_effect_type(effect.effect_type_id, effect.time_left, player)
end
playereffects.inactive_effects[playername] = nil
end
-end)
+end
--[[
minetest.register_on_shutdown(function()