summaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-06-17 02:40:36 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-06-17 02:40:36 +0300
commitd0ea6f9920d30f46d1f5d44e8823a8d932f9f29d (patch)
tree5b75f389b027a058e1f47fa3103a1cfb51f26b9b /src/content_cao.cpp
parent1bc37d576ce790c1169c5f9996be7bbc8026db2c (diff)
downloadminetest-d0ea6f9920d30f46d1f5d44e8823a8d932f9f29d.tar.gz
minetest-d0ea6f9920d30f46d1f5d44e8823a8d932f9f29d.tar.bz2
minetest-d0ea6f9920d30f46d1f5d44e8823a8d932f9f29d.zip
Properly and efficiently use split utility headers
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r--src/content_cao.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index cbcf66ef7..c993f3f83 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -30,13 +30,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "clientobject.h"
#include "content_object.h"
#include "mesh.h"
-#include "utility.h" // For IntervalLimiter
#include "itemdef.h"
#include "tool.h"
#include "content_cso.h"
#include "sound.h"
#include "nodedef.h"
#include "localplayer.h"
+#include "util/numeric.h" // For IntervalLimiter
+#include "util/serialize.h"
+
class Settings;
struct ToolCapabilities;
@@ -935,7 +937,7 @@ public:
}
}
if(fabs(m_prop.automatic_rotate) > 0.001){
- m_yaw += dtime * m_prop.automatic_rotate * 180 / PI;
+ m_yaw += dtime * m_prop.automatic_rotate * 180 / M_PI;
updateNodePos();
}
}
@@ -961,7 +963,7 @@ public:
else if(cam_to_entity.Y < -0.75)
col += 4;
else{
- float mob_dir = atan2(cam_to_entity.Z, cam_to_entity.X) / PI * 180.;
+ float mob_dir = atan2(cam_to_entity.Z, cam_to_entity.X) / M_PI * 180.;
float dir = mob_dir - m_yaw;
dir = wrapDegrees_180(dir);
//infostream<<"id="<<m_id<<" dir="<<dir<<std::endl;