Moved debug_head above function.

This commit is contained in:
Your Name 2022-08-08 15:50:30 -05:00
parent da81f0b5b4
commit 384e5ece67
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ local vector = vector
local degrees = function(yaw)
return yaw*180.0/math.pi
end
local debug_head = minetest.settings:get_bool("mcl_debug_head_code", false)
mobs.do_head_logic = function(self, dtime, player)
if not self.has_head == true then return end
local player = player or minetest.get_player_by_name("singleplayer")
@ -24,7 +24,7 @@ mobs.do_head_logic = function(self, dtime, player)
local head_offset = vector.multiply(body_dir, self.head_direction_offset)
pos = vector.add(pos, head_offset)
local debug_head = minetest.settings:get_bool("mcl_debug_head_code", false)
if debug_head then
minetest.add_particle({
pos = pos,