#35 Fix floating slimes

This commit is contained in:
kay27 2022-01-03 08:08:56 +04:00
parent 698c29733f
commit 7a1cdc89fb
1 changed files with 5 additions and 0 deletions

View File

@ -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