From fc571ad46df8f3dcc04745bc55d9ca6e1e82ed87 Mon Sep 17 00:00:00 2001 From: sapier Date: Wed, 31 Jul 2013 17:29:25 +0200 Subject: Add support for entities to automatic face movement direction --- src/content_cao.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/content_cao.cpp') diff --git a/src/content_cao.cpp b/src/content_cao.cpp index bbee0bc83..20f5fd3db 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -1210,6 +1210,11 @@ public: m_yaw += dtime * m_prop.automatic_rotate * 180 / M_PI; updateNodePos(); } + + if (getParent() == NULL && m_prop.automatic_face_movement_dir){ + m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI; + updateNodePos(); + } } void updateTexturePos() -- cgit v1.2.3