]> git.localhorst.tv Git - blank.git/blobdiff - src/client/client.cpp
restore orientation on player load
[blank.git] / src / client / client.cpp
index 97292a957f86466a228dbd24f1c45e28a20aae85..fd4fbee8bad7c3b68362bb4950cebd2ecf2a3406 100644 (file)
@@ -380,6 +380,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());