X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=455550afeccc27500120409a1b8162be50a5fdc6;hb=54f3f1260b95a924fcb40d9d6de3fa2e2c382f6f;hp=97292a957f86466a228dbd24f1c45e28a20aae85;hpb=f430ad789fe620ad2e8b2b2b99af868372791295;p=blank.git diff --git a/src/client/client.cpp b/src/client/client.cpp index 97292a9..455550a 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -147,7 +147,9 @@ void InteractiveState::Update(int dt) { } void InteractiveState::Render(Viewport &viewport) { - viewport.WorldPosition(player.GetEntity().Transform(player.GetEntity().ChunkCoords())); + viewport.WorldPosition( + player.GetEntity().Transform(player.GetEntity().ChunkCoords()) + * player.GetEntity().GetModel().EyesTransform()); if (master.GetConfig().video.world) { chunk_renderer.Render(viewport); world.Render(viewport); @@ -380,6 +382,8 @@ void MasterState::On(const Packet::Join &pack) { state.reset(new InteractiveState(*this, player_id)); pack.ReadPlayerState(state->GetPlayer().GetEntity().GetState()); + glm::vec3 orient(glm::eulerAngles(state->GetPlayer().GetEntity().Orientation())); + state->GetPlayerController().TurnHead(orient.x, orient.y); env.state.PopAfter(this); env.state.Push(state.get());