mirror of
https://repo.or.cz/minetest_playereffects.git
synced 2024-11-16 05:10:17 +01:00
Further performance optimizations
This commit is contained in:
parent
6d27ae23a7
commit
a942264256
|
@ -211,7 +211,12 @@ minetest.register_chatcommand("stresstest", {
|
||||||
end
|
end
|
||||||
minetest.debug("[playereffects] Stress test started for "..name.." with "..max.." effects.")
|
minetest.debug("[playereffects] Stress test started for "..name.." with "..max.." effects.")
|
||||||
for i=1,max do
|
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
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
1
init.lua
1
init.lua
|
@ -115,7 +115,6 @@ function playereffects.apply_effect_type(effect_type_id, duration, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
local effect_id = playereffects.next_effect_id()
|
local effect_id = playereffects.next_effect_id()
|
||||||
local effects = playereffects.get_player_effects(playername)
|
|
||||||
local smallest_hudpos
|
local smallest_hudpos
|
||||||
local biggest_hudpos = -1
|
local biggest_hudpos = -1
|
||||||
local free_hudpos
|
local free_hudpos
|
||||||
|
|
Loading…
Reference in New Issue
Block a user