mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Add set_breath and get_breath to lua API.
This commit is contained in:
parent
ab145c8827
commit
d19c8b815d
14 changed files with 195 additions and 19 deletions
|
@ -935,6 +935,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_,
|
|||
m_moved(false),
|
||||
m_inventory_not_sent(false),
|
||||
m_hp_not_sent(false),
|
||||
m_breath_not_sent(false),
|
||||
m_wielded_item_not_sent(false),
|
||||
m_physics_override_speed(1),
|
||||
m_physics_override_jump(1),
|
||||
|
@ -1370,6 +1371,16 @@ void PlayerSAO::setHP(s16 hp)
|
|||
}
|
||||
}
|
||||
|
||||
u16 PlayerSAO::getBreath() const
|
||||
{
|
||||
return m_player->getBreath();
|
||||
}
|
||||
|
||||
void PlayerSAO::setBreath(u16 breath)
|
||||
{
|
||||
m_player->setBreath(breath);
|
||||
}
|
||||
|
||||
void PlayerSAO::setArmorGroups(const ItemGroupList &armor_groups)
|
||||
{
|
||||
m_armor_groups = armor_groups;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue