Skip to content

Commit

Permalink
simple swimming fix to stop floaters
Browse files Browse the repository at this point in the history
  • Loading branch information
tenplus1 committed Jan 7, 2021
1 parent 76ee3d0 commit 55eb893
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 55eb893

Please sign in to comment.