summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-05-27 15:41:28 +0200
committersfan5 <sfan5@live.de>2020-05-27 21:58:20 +0200
commit2fd5f38c45a3b57a9ea2d566aa50f9e5c33794d2 (patch)
treeb8f9e773caa05fc90edc1e056e45d7b45e4e7ace /builtin
parent03dae5fba6c4211290bf828b8268099415c68986 (diff)
downloadminetest-2fd5f38c45a3b57a9ea2d566aa50f9e5c33794d2.tar.gz
minetest-2fd5f38c45a3b57a9ea2d566aa50f9e5c33794d2.tar.bz2
minetest-2fd5f38c45a3b57a9ea2d566aa50f9e5c33794d2.zip
Change item entity collisionbox so that they don't sink into the ground
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/item_entity.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/game/item_entity.lua b/builtin/game/item_entity.lua
index 5d2cd7c76..20dd18044 100644
--- a/builtin/game/item_entity.lua
+++ b/builtin/game/item_entity.lua
@@ -27,8 +27,6 @@ core.register_entity(":__builtin:item", {
visual = "wielditem",
visual_size = {x = 0.4, y = 0.4},
textures = {""},
- spritediv = {x = 1, y = 1},
- initial_sprite_basepos = {x = 0, y = 0},
is_visible = false,
},
@@ -56,7 +54,6 @@ core.register_entity(":__builtin:item", {
local max_count = stack:get_stack_max()
local count = math.min(stack:get_count(), max_count)
local size = 0.2 + 0.1 * (count / max_count) ^ (1 / 3)
- local coll_height = size * 0.75
local def = core.registered_nodes[itemname]
local glow = def and math.floor(def.light_source / 2 + 0.5)
@@ -65,9 +62,7 @@ core.register_entity(":__builtin:item", {
visual = "wielditem",
textures = {itemname},
visual_size = {x = size, y = size},
- collisionbox = {-size, -coll_height, -size,
- size, coll_height, size},
- selectionbox = {-size, -size, -size, size, size, size},
+ collisionbox = {-size, -size, -size, size, size, size},
automatic_rotate = math.pi * 0.5 * 0.2 / size,
wield_item = self.itemstring,
glow = glow,