Fix automatic rotate for attached entities (#12392)

master
Lars Müller 2022-07-17 15:45:57 +02:00 committed by GitHub
parent 7b6c4bf2e0
commit d400a98ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1197,7 +1197,7 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
}
}
if (!getParent() && node && fabs(m_prop.automatic_rotate) > 0.001f) {
if (node && fabs(m_prop.automatic_rotate) > 0.001f) {
// This is the child node's rotation. It is only used for automatic_rotate.
v3f local_rot = node->getRotation();
local_rot.Y = modulo360f(local_rot.Y - dtime * core::RADTODEG *