mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-03-11 06:07:44 +01:00
actually support spawnbox, drop old collisionbox workaround
This commit is contained in:
parent
2c2e5d7dc8
commit
f8a6172ca3
1 changed files with 2 additions and 7 deletions
|
@ -145,12 +145,6 @@ function mcl_mobs.register_mob(name, def)
|
|||
end
|
||||
|
||||
local collisionbox = def.collisionbox or {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}
|
||||
-- Workaround for <https://github.com/minetest/minetest/issues/5966>:
|
||||
-- Increase upper Y limit to avoid mobs glitching through solid nodes.
|
||||
-- FIXME: Remove workaround if it's no longer needed.
|
||||
if collisionbox[5] < 0.79 then
|
||||
collisionbox[5] = 0.79
|
||||
end
|
||||
local final_def = {
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
head_swivel = def.head_swivel or nil, -- bool to activate this function
|
||||
|
@ -190,7 +184,8 @@ function mcl_mobs.register_mob(name, def)
|
|||
breathes_in_water = def.breathes_in_water or false,
|
||||
physical = true,
|
||||
collisionbox = collisionbox,
|
||||
selectionbox = def.selectionbox or def.collisionbox,
|
||||
selectionbox = def.selectionbox or collisionbox,
|
||||
spawnbox = def.spawnbox or collisionbox,
|
||||
visual = def.visual,
|
||||
visual_size = def.visual_size or {x = 1, y = 1},
|
||||
mesh = def.mesh,
|
||||
|
|
Loading…
Reference in a new issue