mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Player: New get_look, set_look API
Deprecate get_look / set_look pitch / yaw
This commit is contained in:
parent
04fb10914c
commit
fa0bbbf96d
4 changed files with 124 additions and 12 deletions
16
src/player.h
16
src/player.h
|
@ -188,16 +188,28 @@ public:
|
|||
m_breath = breath;
|
||||
}
|
||||
|
||||
f32 getRadPitch()
|
||||
// Deprecated
|
||||
f32 getRadPitchDep()
|
||||
{
|
||||
return -1.0 * m_pitch * core::DEGTORAD;
|
||||
}
|
||||
|
||||
f32 getRadYaw()
|
||||
// Deprecated
|
||||
f32 getRadYawDep()
|
||||
{
|
||||
return (m_yaw + 90.) * core::DEGTORAD;
|
||||
}
|
||||
|
||||
f32 getRadPitch()
|
||||
{
|
||||
return m_pitch * core::DEGTORAD;
|
||||
}
|
||||
|
||||
f32 getRadYaw()
|
||||
{
|
||||
return m_yaw * core::DEGTORAD;
|
||||
}
|
||||
|
||||
const char *getName() const
|
||||
{
|
||||
return m_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue