1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-29 05:10:25 +02:00

Player_api: Integrate settable player collisionbox

This commit is contained in:
paramat
2017-08-01 04:14:09 +01:00
committed by paramat
parent 271b2befaa
commit b4abb07572
3 changed files with 4 additions and 0 deletions

View File

@ -45,12 +45,14 @@ function player_api.set_model(player, model_name)
textures = player_textures[name] or model.textures,
visual = "mesh",
visual_size = model.visual_size or {x=1, y=1},
collisionbox = model.collisionbox or {-0.3, 0.0, -0.3, 0.3, 1.77, 0.3},
})
player_api.set_animation(player, "stand")
else
player:set_properties({
textures = { "player.png", "player_back.png", },
visual = "upright_sprite",
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3},
})
end
player_model[name] = model_name