summaryrefslogtreecommitdiff
path: root/examples.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2014-07-17 17:42:31 +0200
committerWuzzy <almikes@aol.com>2014-07-17 17:42:31 +0200
commita94226425696d273dbfd0b60564146f1d6a73c84 (patch)
tree5541d4682de2b23af7bc9b1e2d6ea90c20884cc8 /examples.lua
parent6d27ae23a7fb4d146e9dee5873cd04034fa4e697 (diff)
Further performance optimizations
Diffstat (limited to 'examples.lua')
-rw-r--r--examples.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples.lua b/examples.lua
index 807bc55..71a4f43 100644
--- a/examples.lua
+++ b/examples.lua
@@ -211,7 +211,12 @@ minetest.register_chatcommand("stresstest", {
end
minetest.debug("[playereffects] Stress test started for "..name.." with "..max.." effects.")
for i=1,max do
- playereffects.apply_effect_type("stress", 10, player)
+ minetest.after(0.1,function(player) playereffects.apply_effect_type("stress", 10, player) end, 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.")
+
+ end
end
end
})