X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2Fworld.cpp;h=08ee294fca5e5a8b72351be8bb3ff3e3e40abdd2;hb=be06fbd6c75dabf411f33ebdeed29e60fb639694;hp=f472da94f2f20a46cfe9d6a1f16fb4c0fbe629e7;hpb=2da9efc1037fba0461303327151318b8edf4dfc7;p=blank.git diff --git a/src/world/world.cpp b/src/world/world.cpp index f472da9..08ee294 100644 --- a/src/world/world.cpp +++ b/src/world/world.cpp @@ -128,15 +128,9 @@ Ray Entity::Aim(const Chunk::Pos &chunk_offset) const noexcept { void Entity::UpdateModel() noexcept { state.AdjustHeading(); + state.orient = glm::quat(glm::vec3(0.0f, state.yaw, 0.0f)); if (model) { - Part::State &body_state = model.BodyState(); - Part::State &eyes_state = model.EyesState(); - if (&body_state != &eyes_state) { - body_state.orientation = glm::quat(glm::vec3(0.0f, state.yaw, 0.0f)); - eyes_state.orientation = glm::quat(glm::vec3(state.pitch, 0.0f, 0.0f)); - } else { - eyes_state.orientation = glm::quat(glm::vec3(state.pitch, state.yaw, 0.0f)); - } + model.EyesState().orientation = glm::quat(glm::vec3(state.pitch, 0.0f, 0.0f)); } }