]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/raycast.h
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / raycast.h
index d69d9339b025db06f2f4d75892fac0ee9286804c..4f5ca2a5bfde5d55d25f2cb91e5f8276bf396d11 100644 (file)
@@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef SRC_RAYCAST_H_
-#define SRC_RAYCAST_H_
+#pragma once
 
 #include "voxelalgorithms.h"
 #include "util/pointedthing.h"
@@ -39,7 +38,7 @@ class RaycastState
         * @param liquids pointable if false, liquid nodes won't be found
         */
        RaycastState(const core::line3d<f32> &shootline, bool objects_pointable,
-               bool liquids_pointable);
+               bool liquids_pointable, bool nodes_pointable = true);
 
        //! Shootline of the raycast.
        core::line3d<f32> m_shootline;
@@ -56,6 +55,7 @@ class RaycastState
 
        bool m_objects_pointable;
        bool m_liquids_pointable;
+       bool m_nodes_pointable;
 
        //! The code needs to search these nodes around the center node.
        core::aabbox3d<s16> m_search_range { 0, 0, 0, 0, 0, 0 };
@@ -76,6 +76,3 @@ class RaycastState
  */
 bool boxLineCollision(const aabb3f &box, const v3f &start, const v3f &dir,
        v3f *collision_point, v3s16 *collision_normal);
-
-
-#endif /* SRC_RAYCAST_H_ */