1
0
Fork 0

Fix some more global var warnings

This commit is contained in:
cora 2022-11-11 17:28:45 +01:00
parent c25287e493
commit 2b691dea07
5 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,6 @@ local mob_class = mcl_mobs.mob_class
local damage_enabled = minetest.settings:get_bool("enable_damage")
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
local show_health = false
-- pathfinding settings
local stuck_timeout = 3 -- how long before mob gets stuck in place and starts searching
local stuck_path_timeout = 10 -- how long will mob follow path before giving up

View File

@ -297,7 +297,6 @@ minetest.register_entity(name, setmetatable({
on_breed = def.on_breed,
on_grown = def.on_grown,
on_pick_up = def.on_pick_up,
on_detach_child = mob_detach_child,
on_activate = function(self, staticdata, dtime)
--this is a temporary hack so mobs stop
--glitching and acting really weird with the

View File

@ -4,6 +4,8 @@ local DEFAULT_FALL_SPEED = -9.81*1.5
local FLOP_HEIGHT = 6
local FLOP_HOR_SPEED = 1.5
local PATHFINDING = "gowp"
local enable_pathfinding = true
local node_ice = "mcl_core:ice"
local node_snowblock = "mcl_core:snowblock"
local node_snow = "mcl_core:snow"

View File

@ -11,6 +11,7 @@ local PATHFINDING = "gowp"
local mobs_debug = minetest.settings:get_bool("mobs_debug", false)
local mobs_drop_items = minetest.settings:get_bool("mobs_drop_items") ~= false
local mob_active_range = tonumber(minetest.settings:get("mcl_mob_active_range")) or 48
local show_health = false
-- get node but use fallback for nil or unknown
local node_ok = function(pos, fallback)

View File

@ -733,7 +733,7 @@ function mob_class:check_despawn(pos)
and self.state ~= "attack"
and self.following == nil then
if self.despawn_immediately or self.lifetimer <= 0 then
if spawn_logging then
if logging then
minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out")
end
mcl_burning.extinguish(self.object)