diff --git a/api.lua b/api.lua index c3655a1..06fbd12 100644 --- a/api.lua +++ b/api.lua @@ -143,14 +143,14 @@ function creatura.get_ground_level(pos, range) local under = {x = above.x, y = above.y - 1, z = above.z} if not get_node_def(above).walkable and get_node_def(under).walkable then return above end if get_node_def(above).walkable then - for i = 1, range do + for _ = 1, range do under = above above = {x = above.x, y = above.y + 1, z = above.z} if not get_node_def(above).walkable and get_node_def(under).walkable then return above end end end if not get_node_def(under).walkable then - for i = 1, range do + for _ = 1, range do above = under under = {x = under.x, y = under.y - 1, z = under.z} if not get_node_def(above).walkable and get_node_def(under).walkable then return above end diff --git a/methods.lua b/methods.lua index 01db6c2..6d37e05 100644 --- a/methods.lua +++ b/methods.lua @@ -34,7 +34,7 @@ local vec_sub = vector.subtract local yaw2dir = minetest.yaw_to_dir local dir2yaw = minetest.dir_to_yaw -local function debugpart(pos, time, tex) +--[[local function debugpart(pos, time, tex) minetest.add_particle({ pos = pos, texture = tex or "creatura_particle_red.png", @@ -42,7 +42,7 @@ local function debugpart(pos, time, tex) glow = 16, size = 16 }) -end +end]] --------------------- -- Local Utilities -- @@ -122,7 +122,7 @@ function creatura.get_collision_ranged(self, dir, range) local dir_x, dir_y, dir_z = dir.x, dir.y, dir.z local dist local collision - for i = 0, range or 4 do + for _ = 0, range or 4 do pos_x = pos_x + dir_x pos_y = pos_y + dir_y pos_z = pos_z + dir_z diff --git a/spawning.lua b/spawning.lua index 9b13932..e320fbc 100644 --- a/spawning.lua +++ b/spawning.lua @@ -580,7 +580,7 @@ function creatura.register_abm_spawn(mob, def) end end end - + minetest.log("action", "[Creatura] [ABM Spawning] Spawned " .. group_size .. " " .. mob .. " at " .. minetest.pos_to_string(pos))