updateNodePos();
}
- if (getParent() == NULL && m_prop.automatic_face_movement_dir){
- m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI;
+ if (getParent() == NULL && 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;
updateNodePos();
}
}
float override_speed = readF1000(is);
float override_jump = readF1000(is);
float override_gravity = readF1000(is);
+ // these are sent inverted so we get true when the server sends nothing
+ bool sneak = !readU8(is);
+ bool sneak_glitch = !readU8(is);
+
if(m_is_local_player)
{
LocalPlayer *player = m_env->getLocalPlayer();
player->physics_override_speed = override_speed;
player->physics_override_jump = override_jump;
player->physics_override_gravity = override_gravity;
+ player->physics_override_sneak = sneak;
+ player->physics_override_sneak_glitch = sneak_glitch;
}
}
else if(cmd == GENERIC_CMD_SET_ANIMATION)