mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Fix get_velocity (mobs internal)
This commit is contained in:
parent
14207dd96a
commit
e53a193c4f
1 changed files with 4 additions and 1 deletions
|
@ -261,8 +261,11 @@ end
|
||||||
local get_velocity = function(self)
|
local get_velocity = function(self)
|
||||||
|
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
|
v.y = 0
|
||||||
|
|
||||||
if v then
|
if v then
|
||||||
return (v.x * v.x + v.z * v.z) ^ 0.5
|
return vector_length(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue