Skip to content

Commit

Permalink
Fixed #130.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jun 28, 2020
1 parent e085664 commit 466c0cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/client/network/ClientCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ void ClientCommandHandler::setupCallbacks() {
else {
m_player.setPosition(pos.x, pos.y, pos.z);
m_player.setRotation(cameraYaw, cameraPitch);
m_player.setDimension(dimension);
m_player.updateCamera();
}
});
Expand Down
1 change: 1 addition & 0 deletions source/client/states/GameState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class GameState : public gk::ApplicationState {

void update() override;

ClientPlayer &player() { return m_player; }
Client &client() { return m_client; }
ClientWorld &world() { return m_world; }
ClientCommandHandler &clientCommandHandler() { return m_clientCommandHandler; }
Expand Down
2 changes: 1 addition & 1 deletion source/client/states/ServerLoadingState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void ServerLoadingState::update() {
if (m_showLoadingState)
std::this_thread::sleep_for(std::chrono::milliseconds(500));

m_game.world().changeDimension(0);
m_game.world().changeDimension(m_game.player().dimension());

m_stateStack->pop();

Expand Down

0 comments on commit 466c0cf

Please sign in to comment.