diff options
author | random-geek <35757396+random-geek@users.noreply.github.com> | 2018-12-30 16:07:30 -0800 |
---|---|---|
committer | Paramat <paramat@users.noreply.github.com> | 2018-12-31 00:07:30 +0000 |
commit | aa5ec2ec02f331542dfe40e781c7c93ee4c0c131 (patch) | |
tree | 207960a9115366cc9d1d82cd593dd855b166b173 /src/client/game.cpp | |
parent | 7d7ccf5c0f3d8689519629282d72b1fea8f4bf30 (diff) | |
download | minetest-aa5ec2ec02f331542dfe40e781c7c93ee4c0c131.tar.gz minetest-aa5ec2ec02f331542dfe40e781c7c93ee4c0c131.tar.bz2 minetest-aa5ec2ec02f331542dfe40e781c7c93ee4c0c131.zip |
Extend pitch fly mode to swimming (#7943)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r-- | src/client/game.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index 06e8eefe3..bd37bd58a 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -702,7 +702,7 @@ protected: void openConsole(float scale, const wchar_t *line=NULL); void toggleFreeMove(); void toggleFreeMoveAlt(); - void togglePitchFly(); + void togglePitchMove(); void toggleFast(); void toggleNoClip(); void toggleCinematic(); @@ -1898,8 +1898,8 @@ void Game::processKeyInput() toggleFreeMove(); } else if (wasKeyDown(KeyType::JUMP)) { toggleFreeMoveAlt(); - } else if (wasKeyDown(KeyType::PITCHFLY)) { - togglePitchFly(); + } else if (wasKeyDown(KeyType::PITCHMOVE)) { + togglePitchMove(); } else if (wasKeyDown(KeyType::FASTMOVE)) { toggleFast(); } else if (wasKeyDown(KeyType::NOCLIP)) { @@ -2109,15 +2109,15 @@ void Game::toggleFreeMoveAlt() } -void Game::togglePitchFly() +void Game::togglePitchMove() { - bool pitch_fly = !g_settings->getBool("pitch_fly"); - g_settings->set("pitch_fly", bool_to_cstr(pitch_fly)); + bool pitch_move = !g_settings->getBool("pitch_move"); + g_settings->set("pitch_move", bool_to_cstr(pitch_move)); - if (pitch_fly) { - m_game_ui->showTranslatedStatusText("Pitch fly mode enabled"); + if (pitch_move) { + m_game_ui->showTranslatedStatusText("Pitch move mode enabled"); } else { - m_game_ui->showTranslatedStatusText("Pitch fly mode disabled"); + m_game_ui->showTranslatedStatusText("Pitch move mode disabled"); } } |