mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 02:00:21 +01:00
fix flying mobs sinking into water
This commit is contained in:
parent
81f99931fc
commit
5e67163d09
3
api.lua
3
api.lua
@ -574,8 +574,7 @@ function mob_class:attempt_flight_correction(override)
|
|||||||
|
|
||||||
local flyable_nodes = minetest.find_nodes_in_area(
|
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},
|
||||||
{x = pos.x + 1, y = pos.y + 0, z = pos.z + 1}, searchnodes)
|
{x = pos.x + 1, y = pos.y + 2, z = pos.z + 1}, searchnodes)
|
||||||
-- pos.y + 0 hopefully fixes floating swimmers
|
|
||||||
|
|
||||||
if #flyable_nodes < 1 then
|
if #flyable_nodes < 1 then
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user