mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
fix crash on creeper explosion ( #1755 )
This commit is contained in:
parent
b6dd8d5c44
commit
66f132a645
1 changed files with 28 additions and 25 deletions
|
@ -38,8 +38,11 @@ end
|
||||||
--this is a generic float function
|
--this is a generic float function
|
||||||
mobs.float = function(self)
|
mobs.float = function(self)
|
||||||
|
|
||||||
if self.object:get_acceleration().y ~= 0 then
|
local acceleration = self.object:get_acceleration()
|
||||||
|
if acceleration and acceleration.y ~= 0 then
|
||||||
self.object:set_acceleration(vector_new(0,0,0))
|
self.object:set_acceleration(vector_new(0,0,0))
|
||||||
|
else
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local current_velocity = self.object:get_velocity()
|
local current_velocity = self.object:get_velocity()
|
||||||
|
|
Loading…
Reference in a new issue