Move tool stuff to tool.{h,cpp}
[oweals/minetest.git] / src / collision.cpp
index 01d5462847134f952626b4ea315dc83910b02286..2380b1627a5bbfd366ea0b213bc89977d3d413dc 100644 (file)
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "collision.h"
 #include "mapblock.h"
 #include "map.h"
+#include "mapnode_contentfeatures.h"
 
 collisionMoveResult collisionMoveSimple(Map *map, f32 pos_max_d,
                const core::aabbox3d<f32> &box_0,
@@ -78,7 +79,8 @@ collisionMoveResult collisionMoveSimple(Map *map, f32 pos_max_d,
        {
                try{
                        // Object collides into walkable nodes
-                       if(content_walkable(map->getNode(v3s16(x,y,z)).d) == false)
+                       MapNode n = map->getNode(v3s16(x,y,z));
+                       if(content_features(n).walkable == false)
                                continue;
                }
                catch(InvalidPositionException &e)