2015-06-17 09:40:37 -05:00
|
|
|
local magicTick = 4
|
|
|
|
local magicTickCount = 0
|
|
|
|
|
|
|
|
function magic_globalstep(dtime)
|
|
|
|
magicTickCount = magicTickCount + dtime
|
|
|
|
if ( magicTickCount > magicTick ) then
|
|
|
|
for _,player in ipairs(minetest.get_connected_players()) do
|
|
|
|
local name = player:get_player_name()
|
|
|
|
magic.update_magic(player,name)
|
|
|
|
end
|
|
|
|
magicTickCount = 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|