mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
3D model support for players using Irrlicht. Also ready the basis for mesh support on nodes / items via LUA (to be done). Supports any mesh format compatible with Irrlicht, but animations are not set up yet.
This commit is contained in:
parent
e02b95741b
commit
ac97a7f70e
3 changed files with 51 additions and 3 deletions
|
@ -782,12 +782,14 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_,
|
|||
m_prop.physical = false;
|
||||
m_prop.weight = 75;
|
||||
m_prop.collisionbox = core::aabbox3d<f32>(-1/3.,-1.0,-1/3., 1/3.,1.0,1/3.);
|
||||
m_prop.visual = "upright_sprite";
|
||||
// start of default appearance, this should be overwritten by LUA
|
||||
m_prop.visual = "upright-sprite";
|
||||
m_prop.visual_size = v2f(1, 2);
|
||||
m_prop.textures.clear();
|
||||
m_prop.textures.push_back("player.png");
|
||||
m_prop.textures.push_back("player_back.png");
|
||||
m_prop.spritediv = v2s16(1,1);
|
||||
// end of default appearance
|
||||
m_prop.is_visible = (getHP() != 0);
|
||||
m_prop.makes_footstep_sound = true;
|
||||
}
|
||||
|
@ -1136,6 +1138,7 @@ void PlayerSAO::disconnected()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
std::string PlayerSAO::getPropertyPacket()
|
||||
{
|
||||
m_prop.is_visible = (getHP() != 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue