mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Do not need to create new vector each time
This commit is contained in:
parent
6097dacbab
commit
038d9ec014
1 changed files with 2 additions and 2 deletions
|
@ -1006,8 +1006,8 @@ function mob_class:check_suspend(player_in_active_range)
|
||||||
local acc = self.object:get_acceleration()
|
local acc = self.object:get_acceleration()
|
||||||
if acc then
|
if acc then
|
||||||
if acc.y > 0 or node_under ~= "air" then
|
if acc.y > 0 or node_under ~= "air" then
|
||||||
self.object:set_acceleration(vector.new(0,0,0))
|
self.object:set_acceleration(vector.zero())
|
||||||
self.object:set_velocity(vector.new(0,0,0))
|
self.object:set_velocity(vector.zero())
|
||||||
end
|
end
|
||||||
if acc.y == 0 and node_under == "air" then
|
if acc.y == 0 and node_under == "air" then
|
||||||
self:falling(pos)
|
self:falling(pos)
|
||||||
|
|
Loading…
Reference in a new issue