mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-09 01:03:50 +01:00
Fix mobs flopping for the first second when in thier own element
This commit is contained in:
parent
1d3f52004f
commit
9099f3ac7a
@ -531,7 +531,7 @@ local flight_check = function(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for _,checknode in pairs(fly_in) do
|
for _,checknode in pairs(fly_in) do
|
||||||
if nod == checknode then
|
if nod == checknode or nod == "ignore" then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2468,7 +2468,7 @@ local follow_flop = function(self)
|
|||||||
-- swimmers flop when out of their element, and swim again when back in
|
-- swimmers flop when out of their element, and swim again when back in
|
||||||
if self.fly then
|
if self.fly then
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
if not flight_check(self, s) then
|
if flight_check(self, s) == false then
|
||||||
|
|
||||||
self.state = "flop"
|
self.state = "flop"
|
||||||
self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0})
|
self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0})
|
||||||
|
Loading…
Reference in New Issue
Block a user