mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-15 02:46:37 -04:00
Performance Improvements
This commit is contained in:
parent
1df2f0e7f4
commit
d539f9bea5
3 changed files with 33 additions and 19 deletions
|
@ -568,7 +568,7 @@ function creatura.register_abm_spawn(mob, def)
|
|||
if not creatura.is_pos_moveable(spawn_pos, mob_width, mob_height) then
|
||||
spawn_pos = pos
|
||||
end
|
||||
local obj = minetest.add_entity(pos, mob)
|
||||
local obj = minetest.add_entity(spawn_pos, mob)
|
||||
if obj
|
||||
and creatura.registered_on_spawns[mob]
|
||||
and #creatura.registered_on_spawns[mob] > 0 then
|
||||
|
@ -590,10 +590,6 @@ function creatura.register_abm_spawn(mob, def)
|
|||
end
|
||||
end
|
||||
|
||||
for _ = 1, group_size do
|
||||
obj = minetest.add_entity(pos, mob)
|
||||
end
|
||||
|
||||
minetest.log("action",
|
||||
"[Creatura] [ABM Spawning] Spawned " .. group_size .. " " .. mob .. " at " .. minetest.pos_to_string(pos))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue