diff options
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index ed660cf10..f3ccd6db0 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "cpp_api/scriptapi.h" #include "genericobject.h" #include "util/serialize.h" +#include "util/mathconstants.h" std::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types; @@ -522,6 +523,10 @@ void LuaEntitySAO::step(float dtime, bool send_recommended) * dtime * m_acceleration; m_velocity += dtime * m_acceleration; } + + if(m_prop.automatic_face_movement_dir){ + m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI; + } } if(m_registered){ |