mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 06:43:17 -04:00
Other occurrences of f{...} -> f({...})
This commit is contained in:
parent
1e40fee2b6
commit
7a3809da7f
1 changed files with 6 additions and 6 deletions
|
@ -30,7 +30,7 @@ function player_api.set_model(player, model_name)
|
||||||
end
|
end
|
||||||
local model = models[model_name]
|
local model = models[model_name]
|
||||||
if model then
|
if model then
|
||||||
player:set_properties{
|
player:set_properties({
|
||||||
mesh = model_name,
|
mesh = model_name,
|
||||||
textures = player_data.textures or model.textures,
|
textures = player_data.textures or model.textures,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
@ -38,7 +38,7 @@ function player_api.set_model(player, model_name)
|
||||||
collisionbox = model.collisionbox or {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
collisionbox = model.collisionbox or {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
||||||
stepheight = model.stepheight or 0.6,
|
stepheight = model.stepheight or 0.6,
|
||||||
eye_height = model.eye_height or 1.47,
|
eye_height = model.eye_height or 1.47,
|
||||||
}
|
})
|
||||||
local animations = model.animations
|
local animations = model.animations
|
||||||
player:set_local_animation(
|
player:set_local_animation(
|
||||||
animations.stand,
|
animations.stand,
|
||||||
|
@ -49,14 +49,14 @@ function player_api.set_model(player, model_name)
|
||||||
)
|
)
|
||||||
player_api.set_animation(player, "stand")
|
player_api.set_animation(player, "stand")
|
||||||
else
|
else
|
||||||
player:set_properties{
|
player:set_properties({
|
||||||
textures = {"player.png", "player_back.png"},
|
textures = {"player.png", "player_back.png"},
|
||||||
visual = "upright_sprite",
|
visual = "upright_sprite",
|
||||||
visual_size = {x = 1, y = 2},
|
visual_size = {x = 1, y = 2},
|
||||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3},
|
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3},
|
||||||
stepheight = 0.6,
|
stepheight = 0.6,
|
||||||
eye_height = 1.625,
|
eye_height = 1.625,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
player_data.model = model_name
|
player_data.model = model_name
|
||||||
end
|
end
|
||||||
|
@ -83,10 +83,10 @@ function player_api.set_animation(player, anim_name, speed)
|
||||||
player_data.animation = anim_name
|
player_data.animation = anim_name
|
||||||
player_data.animation_speed = speed
|
player_data.animation_speed = speed
|
||||||
player:set_animation(anim, speed, animation_blend)
|
player:set_animation(anim, speed, animation_blend)
|
||||||
player:set_properties{
|
player:set_properties({
|
||||||
collisionbox = anim.collisionbox or model.collisionbox,
|
collisionbox = anim.collisionbox or model.collisionbox,
|
||||||
eye_height = anim.eye_height or model.eye_height
|
eye_height = anim.eye_height or model.eye_height
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
Loading…
Add table
Reference in a new issue