]> git.localhorst.tv Git - blank.git/commitdiff
use eye transform for client rendering
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 19 Oct 2015 15:21:41 +0000 (17:21 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 19 Oct 2015 15:21:41 +0000 (17:21 +0200)
src/client/client.cpp

index fd4fbee8bad7c3b68362bb4950cebd2ecf2a3406..455550afeccc27500120409a1b8162be50a5fdc6 100644 (file)
@@ -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);