]> git.itanic.dy.fi Git - sdl-planets/blobdiff - quadtree.c
quadtree: Allow updating other than just quadtree stats
[sdl-planets] / quadtree.c
index ec683aaa0e8d4e872215e337f3348f5896a21e70..8efd8ad7a465b6a682ff5859350b345e653a02f7 100644 (file)
@@ -131,7 +131,7 @@ struct quadtree *quadtree_add(struct quadtree *parent, struct quadtree *new,
        parent->child[ret] = new;
        new->parent = parent;
 
-       quadtree_recalculate_parent_stats(parent);
+       quadtree_recalculate_parent_stats(new, ops);
 
        validate_tree(new);
 
@@ -229,7 +229,7 @@ struct quadtree *quadtree_del(struct quadtree *node,
        }
 
        /* Fix parent stats */
-       quadtree_recalculate_parent_stats(node->parent);
+       quadtree_recalculate_parent_stats(node->parent, ops);
 
        /*
         * The sub branch is now detached from the main tree. Continue