aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com>2020-11-04 14:40:00 +0100
committerGitHub <noreply@github.com>2020-11-04 14:40:00 +0100
commitfc8c8f01ca15912b1db176fec473bcfb0333032f (patch)
tree08182e80b69d5352f81c6827d3caa4efe13e6f14 /src/client/game.cpp
parent61e2b3a33190d5979bc2e36f9734cebd18465f26 (diff)
parenta7dc1135e94bde5f8c3385d54388563eaffe7553 (diff)
downloaddragonfireclient-fc8c8f01ca15912b1db176fec473bcfb0333032f.tar.xz
Merge branch 'master' into master
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp28
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
*/