diff options
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r-- | src/client/game.cpp | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index d8800d9ea..479484ae9 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2453,9 +2453,6 @@ PointedThing Game::updatePointedThing( ClientMap &map = env.getClientMap(); const NodeDefManager *nodedef = map.getNodeDefManager(); - if (g_settings->getBool("killaura")) - handleKillaura(shootline.start, shootline.getLength()); - runData.selected_object = NULL; hud->pointing_at_object = false; RaycastState s(shootline, look_for_object, liquids_pointable, ! g_settings->getBool("dont_point_nodes")); @@ -2532,22 +2529,6 @@ PointedThing Game::updatePointedThing( return result; } -void Game::handleKillaura(v3f origin, f32 max_d) -{ - ClientEnvironment &env = client->getEnv(); - std::vector<DistanceSortedActiveObject> allObjects; - env.getActiveObjects(origin, max_d, allObjects); - for (const auto &allObject : allObjects) { - ClientActiveObject *obj = allObject.obj; - s16 id = obj->getId(); - aabb3f selection_box; - if (! obj->getSelectionBox(&selection_box)) - continue; - PointedThing pointed(id, v3f(0,0,0), v3s16(0,0,0), 0); - client->interact(INTERACT_START_DIGGING, pointed); - } -} - void Game::handlePointingAtNothing(const ItemStack &playerItem) { infostream << "Right Clicked in Air" << std::endl; @@ -3225,9 +3206,12 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime, Cheat menu */ - if (m_game_ui->m_flags.show_cheat_menu && ! gui_chat_console->isOpen()) - m_cheat_menu->draw(driver, m_game_ui->m_flags.show_debug); - + if (! gui_chat_console->isOpen()) { + if (m_game_ui->m_flags.show_cheat_menu) + m_cheat_menu->draw(driver, m_game_ui->m_flags.show_debug); + if (g_settings->getBool("cheat_hud")) + m_cheat_menu->drawHUD(driver, dtime); + } /* Damage flash */ |