From 044fd237b60b30f2a422b9efd04d20badf61da79 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 8 Dec 2013 12:17:54 +0100 Subject: Moved bindings-related to a Bindings subfolder. Ref.: #407 --- src/Entities/Entity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Entities/Entity.cpp') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 3bea7bc01..91be6dd93 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -10,7 +10,7 @@ #include "../ClientHandle.h" #include "../Chunk.h" #include "../Simulator/FluidSimulator.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "../Tracer.h" #include "Minecart.h" -- cgit v1.2.3 From 6785bb7c165b1d5be87ebf414d877c774eeac708 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 8 Dec 2013 13:08:56 +0100 Subject: Fixed normalizing large angles. --- src/Entities/Entity.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Entities/Entity.cpp') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 91be6dd93..d728d6cbc 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -158,8 +158,7 @@ bool cEntity::Initialize(cWorld * a_World) void cEntity::WrapHeadYaw(void) { - while (m_HeadYaw > 180.f) m_HeadYaw -= 360.f; // Wrap it - while (m_HeadYaw < -180.f) m_HeadYaw += 360.f; + m_HeadYaw = NormalizeAngleDegrees(m_HeadYaw); } @@ -168,10 +167,8 @@ void cEntity::WrapHeadYaw(void) void cEntity::WrapRotation(void) { - while (m_Rot.x > 180.f) m_Rot.x -= 360.f; // Wrap it - while (m_Rot.x < -180.f) m_Rot.x += 360.f; - while (m_Rot.y > 180.f) m_Rot.y -= 360.f; - while (m_Rot.y < -180.f) m_Rot.y += 360.f; + m_Rot.x = NormalizeAngleDegrees(m_Rot.x); + m_Rot.y = NormalizeAngleDegrees(m_Rot.z); } -- cgit v1.2.3