mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +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
14
src/player.h
14
src/player.h
|
@ -160,6 +160,16 @@ public:
|
|||
return m_yaw;
|
||||
}
|
||||
|
||||
u16 getBreath()
|
||||
{
|
||||
return m_breath;
|
||||
}
|
||||
|
||||
virtual void setBreath(u16 breath)
|
||||
{
|
||||
m_breath = breath;
|
||||
}
|
||||
|
||||
f32 getRadPitch()
|
||||
{
|
||||
return -1.0 * m_pitch * core::DEGTORAD;
|
||||
|
@ -249,13 +259,12 @@ public:
|
|||
float physics_override_gravity;
|
||||
|
||||
u16 hp;
|
||||
u16 breath;
|
||||
|
||||
float hurt_tilt_timer;
|
||||
float hurt_tilt_strength;
|
||||
|
||||
u16 peer_id;
|
||||
|
||||
|
||||
std::string inventory_formspec;
|
||||
|
||||
PlayerControl control;
|
||||
|
@ -274,6 +283,7 @@ protected:
|
|||
IGameDef *m_gamedef;
|
||||
|
||||
char m_name[PLAYERNAME_SIZE];
|
||||
u16 m_breath;
|
||||
f32 m_pitch;
|
||||
f32 m_yaw;
|
||||
v3f m_speed;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue