forked from MineClone5/MineClone5
#35 Fix floating slimes
This commit is contained in:
parent
698c29733f
commit
7a1cdc89fb
|
@ -43,6 +43,11 @@ mobs.float = function(self)
|
||||||
self.object:set_acceleration({x=0, y=0, z=0})
|
self.object:set_acceleration({x=0, y=0, z=0})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.jump_only then
|
||||||
|
self.object:set_acceleration({x=acceleration.x, y=-5, z=acceleration.z})
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local current_velocity = self.object:get_velocity()
|
local current_velocity = self.object:get_velocity()
|
||||||
|
|
||||||
local new_velocity_addition = DEFAULT_FLOAT_SPEED - current_velocity.y
|
local new_velocity_addition = DEFAULT_FLOAT_SPEED - current_velocity.y
|
||||||
|
|
Loading…
Reference in New Issue