diff options
author | madmaxoft <github@xoft.cz> | 2014-01-17 10:44:23 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-17 10:44:23 +0100 |
commit | ed1d336614173daaecf0f5c43e8a174970cef631 (patch) | |
tree | 3d3526ac7a8bd61a6eaf03293d4197a71dd9200f /src/Entities/Entity.cpp | |
parent | Protocol 1.7: More output on unknown packets / protocol states. (diff) | |
parent | Changed newline character because of issues (diff) | |
download | cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.gz cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.bz2 cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.lz cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.xz cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.zst cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.zip |
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r-- | src/Entities/Entity.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 8e0d0b9a7..565c78dfd 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -263,16 +263,16 @@ void cEntity::TakeDamage(eDamageType a_DamageType, cEntity * a_Attacker, int a_R -void cEntity::SetRotationFromSpeed(void) +void cEntity::SetYawFromSpeed(void) { const double EPS = 0.0000001; if ((abs(m_Speed.x) < EPS) && (abs(m_Speed.z) < EPS)) { // atan2() may overflow or is undefined, pick any number - SetRotation(0); + SetYaw(0); return; } - SetRotation(atan2(m_Speed.x, m_Speed.z) * 180 / PI); + SetYaw(atan2(m_Speed.x, m_Speed.z) * 180 / PI); } |