diff options
author | madmaxoft <github@xoft.cz> | 2013-11-02 17:45:48 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-03 11:59:05 +0100 |
commit | 9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8 (patch) | |
tree | ef3bb04c80bddcce885f314416a59bbb232a511c /source/Entities | |
parent | Added cPlayer::GetEffectiveGameMode(). (diff) | |
download | cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.tar cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.tar.gz cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.tar.bz2 cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.tar.lz cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.tar.xz cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.tar.zst cuberite-9bdc94053e94c7ca47e2e0dc0db4483a8c0ddfb8.zip |
Diffstat (limited to 'source/Entities')
-rw-r--r-- | source/Entities/Entity.cpp | 4 | ||||
-rw-r--r-- | source/Entities/Entity.h | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/Entities/Entity.cpp b/source/Entities/Entity.cpp index d465c75bd..3bea7bc01 100644 --- a/source/Entities/Entity.cpp +++ b/source/Entities/Entity.cpp @@ -1178,9 +1178,9 @@ void cEntity::SetMass(double a_Mass) -void cEntity::SetRotation(double a_Rotation) +void cEntity::SetYaw(double a_Yaw) { - m_Rot.x = a_Rotation; + m_Rot.x = a_Yaw; m_bDirtyOrientation = true; WrapRotation(); } diff --git a/source/Entities/Entity.h b/source/Entities/Entity.h index c6b70a7fc..dafda7826 100644 --- a/source/Entities/Entity.h +++ b/source/Entities/Entity.h @@ -151,7 +151,8 @@ public: double GetPosY (void) const { return m_Pos.y; } double GetPosZ (void) const { return m_Pos.z; } const Vector3d & GetRot (void) const { return m_Rot; } - double GetRotation (void) const { return m_Rot.x; } + double GetRotation (void) const { return m_Rot.x; } // OBSOLETE, use GetYaw() instead + double GetYaw (void) const { return m_Rot.x; } double GetPitch (void) const { return m_Rot.y; } double GetRoll (void) const { return m_Rot.z; } Vector3d GetLookVector(void) const; @@ -173,7 +174,8 @@ public: void SetPosition(double a_PosX, double a_PosY, double a_PosZ); void SetPosition(const Vector3d & a_Pos) { SetPosition(a_Pos.x, a_Pos.y, a_Pos.z); } void SetRot (const Vector3f & a_Rot); - void SetRotation(double a_Rotation); + void SetRotation(double a_Rotation) { SetYaw(a_Rotation); } // OBSOLETE, use SetYaw() instead + void SetYaw (double a_Yaw); void SetPitch (double a_Pitch); void SetRoll (double a_Roll); void SetSpeed (double a_SpeedX, double a_SpeedY, double a_SpeedZ); |