adapted from player_api: Set eye height property for player model
* backported d4e1bd053e
* Player API: Set eye height property for new player model
This commit is contained in:
parent
2f31767d49
commit
6861a44b60
@ -27,6 +27,7 @@ default.player_register_model("character.b3d", {
|
||||
walk_mine = { x=200, y=219, },
|
||||
sit = { x= 81, y=160, },
|
||||
},
|
||||
eye_height = 1.625,
|
||||
})
|
||||
|
||||
-- Player stats and animations
|
||||
@ -58,12 +59,14 @@ function default.player_set_model(player, model_name)
|
||||
textures = player_textures[name] or model.textures,
|
||||
visual = "mesh",
|
||||
visual_size = model.visual_size or {x=1, y=1},
|
||||
eye_height = model.eye_height or 1.47,
|
||||
})
|
||||
default.player_set_animation(player, "stand")
|
||||
else
|
||||
player:set_properties({
|
||||
textures = { "player.png", "player_back.png", },
|
||||
visual = "upright_sprite",
|
||||
eye_height = 1.625,
|
||||
})
|
||||
end
|
||||
player_model[name] = model_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user