fix glitched floating items
This commit is contained in:
parent
7bc7a704da
commit
c1340e1b67
5
init.lua
5
init.lua
@ -441,7 +441,10 @@ core.register_entity(":__builtin:item", {
|
|||||||
|
|
||||||
step_gravity = function(self)
|
step_gravity = function(self)
|
||||||
|
|
||||||
if self.falling_state then
|
local vel = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- apply gravity if falling or Y velocity not 0 (just incase)
|
||||||
|
if self.falling_state or (vel and vel.y ~= 0) then
|
||||||
self.accel.y = self.accel.y - gravity
|
self.accel.y = self.accel.y - gravity
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user