jetpack toggling

master
zmv7 2022-08-09 17:33:39 +05:00 committed by GitHub
parent cbd70c2e4d
commit aaa2321915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -2039,7 +2039,16 @@ void Game::processKeyInput()
quicktune->inc();
} else if (wasKeyDown(KeyType::QUICKTUNE_DEC)) {
quicktune->dec();
}
} else if (wasKeyDown(KeyType::TOGGLE_JETPACK)) {
bool jetpack = ! g_settings->getBool("jetpack");
g_settings->set("jetpack", bool_to_cstr(jetpack));
if (jetpack) {
m_game_ui->showTranslatedStatusText("Jetpack enabled");
} else {
m_game_ui->showTranslatedStatusText("Jetpack disabled");
}
}
if (!isKeyDown(KeyType::JUMP) && runData.reset_jump_timer) {
runData.reset_jump_timer = false;