1
0
Fork 0

Pick highest y and kick it up a little for visual spice and to fix occassional drop falling into floor

This commit is contained in:
ancientmarinerdev 2023-04-26 22:21:38 +01:00 committed by Johannes Fritz
parent c48510244e
commit 938ee7a832
1 changed files with 2 additions and 0 deletions

View File

@ -818,6 +818,8 @@ minetest.register_entity(":__builtin:item", {
local z_diff = (self_pos.z - pos.z) / 2 local z_diff = (self_pos.z - pos.z) / 2
local new_pos = vector.offset(pos, x_diff, 0, z_diff) local new_pos = vector.offset(pos, x_diff, 0, z_diff)
new_pos.y = math.max(self_pos.y, pos.y) + 0.1
self.object:move_to(new_pos) self.object:move_to(new_pos)
self.age = 0 -- Handle as new entity self.age = 0 -- Handle as new entity