mirror of
https://repo.or.cz/minetest_playereffects.git
synced 2025-01-08 10:20:15 +01:00
Slight performance improvements
This commit is contained in:
parent
a942264256
commit
5bc2ba600c
@ -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.")
|
||||
|
2
init.lua
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user