summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2014-07-17 18:06:49 +0200
committerWuzzy <almikes@aol.com>2014-07-17 18:06:49 +0200
commit5bc2ba600ca8e6c5c49b7a027e715ecfc344c8a9 (patch)
treeb6fbc9046f522062fc03dbf370d8cdd67b43cbc4
parenta94226425696d273dbfd0b60564146f1d6a73c84 (diff)
Slight performance improvements
-rw-r--r--examples.lua2
-rw-r--r--init.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples.lua b/examples.lua
index 71a4f43..7c2102c 100644
--- a/examples.lua
+++ b/examples.lua
@@ -211,7 +211,7 @@ minetest.register_chatcommand("stresstest", {
end
minetest.debug("[playereffects] Stress test started for "..name.." with "..max.." effects.")
for i=1,max do
- minetest.after(0.1,function(player) playereffects.apply_effect_type("stress", 10, player) end, player)
+ playereffects.apply_effect_type("stress", 10, player)
if(i%100==0) then
minetest.debug("[playereffects] Effect "..i.." of "..max.." applied.")
minetest.chat_send_player(name, "[playereffects] Effect "..i.." of "..max.." applied.")
diff --git a/init.lua b/init.lua
index beeda3c..42eefdf 100644
--- a/init.lua
+++ b/init.lua
@@ -165,7 +165,7 @@ function playereffects.apply_effect_type(effect_type_id, duration, player)
playereffects.effects[effect_id] = effect
- minetest.log("action", "[playereffects] Effect type "..effect_type_id.." applied to player "..playername.." (effect_id = "..effect_id..").")
+-- minetest.log("action", "[playereffects] Effect type "..effect_type_id.." applied to player "..playername.." (effect_id = "..effect_id..").")
minetest.after(duration, function(effect_id) playereffects.cancel_effect(effect_id) end, effect_id)
return effect_id