Re-add halo highlight (#5130)
authorDániel Juhász <juhdanad@gmail.com>
Mon, 30 Jan 2017 01:47:36 +0000 (02:47 +0100)
committerZeno- <kde.psych@gmail.com>
Mon, 30 Jan 2017 01:47:36 +0000 (11:47 +1000)
Due to a rebase mistake halo highlighting was disabled. This commit
re-adds that feature.

src/game.cpp

index 1cb054cabf5f18cffae07279781db98fa657ece9..840403c424dc9480645cac106c7e0a4959eb4e23 100644 (file)
@@ -3697,6 +3697,7 @@ PointedThing Game::updatePointedThing(
 {
        std::vector<aabb3f> *selectionboxes = hud->getSelectionBoxes();
        selectionboxes->clear();
+       hud->setSelectedFaceNormal(v3f(0.0, 0.0, 0.0));
        static const bool show_entity_selectionbox = g_settings->getBool(
                "show_entity_selectionbox");
 
@@ -3741,6 +3742,10 @@ PointedThing Game::updatePointedThing(
                }
                hud->setSelectionPos(intToFloat(result.node_undersurface, BS),
                        camera_offset);
+               hud->setSelectedFaceNormal(v3f(
+                       result.intersection_normal.X,
+                       result.intersection_normal.Y,
+                       result.intersection_normal.Z));
        }
 
        // Update selection mesh light level and vertex colors