mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Add offset to automatic_face_movement_dir
This commit is contained in:
@@ -527,8 +527,9 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
|
||||
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_prop.automatic_face_movement_dir) &&
|
||||
(fabs(m_velocity.Z) > 0.001 || fabs(m_velocity.X) > 0.001)){
|
||||
m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI + m_prop.automatic_face_movement_dir_offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user