simple swimming fix to stop floaters

This commit is contained in:
TenPlus1 2021-01-07 10:42:10 +00:00
parent 76ee3d0b51
commit 55eb893a9a
1 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20210104",
version = "20210107",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -572,7 +572,8 @@ function mob_class:attempt_flight_correction(override)
local flyable_nodes = minetest.find_nodes_in_area(
{x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1}, searchnodes)
{x = pos.x + 1, y = pos.y + 0, z = pos.z + 1}, searchnodes)
-- pos.y + 0 hopefully fixes floating swimmers
if #flyable_nodes < 1 then
return false