]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - src/server/voxel_depth_search.h
Trees break if they have no connection to ground
[dragonblocks_alpha.git] / src / server / voxel_depth_search.h
index 27127070d8cc9a85f0204d8cee8510918344f382..b9163a051e6688f9fd87a3feb6b921e8193a554e 100644 (file)
@@ -8,15 +8,16 @@
 typedef enum {
        DEPTH_SEARCH_TARGET, // goal has been reached
        DEPTH_SEARCH_PATH,   // can used this as path
-       DEPTH_SEARCH_BLOCK   // cannot use this as paths
+       DEPTH_SEARCH_BLOCK   // cannot use this as path
 } DepthSearchNodeType;
 
 typedef struct {
        v3s32 pos;
        DepthSearchNodeType type;
        bool *success;
+       void *extra;
 } DepthSearchNode;
 
-bool voxel_depth_search(v3s32 pos, DepthSearchNodeType (*get_type)(v3s32 pos), bool *success, Tree *visit);
+bool voxel_depth_search(v3s32 pos, void (*callback)(DepthSearchNode *node, void *arg), void *arg, bool *success, Tree *visit);
 
 #endif // _VOXEL_DEPTH_SEARCH_