diff --git a/code/datums/quadtree.dm b/code/datums/quadtree.dm index d00f202cc15c..2b0360152997 100644 --- a/code/datums/quadtree.dm +++ b/code/datums/quadtree.dm @@ -10,14 +10,14 @@ var/z_level /// Don't divide further when truthy - var/final + var/final_divide = FALSE /datum/quadtree/New(datum/shape/rectangle/rect, z) . = ..() boundary = rect z_level = z if(boundary.width <= QUADTREE_BOUNDARY_MINIMUM_WIDTH || boundary.height <= QUADTREE_BOUNDARY_MINIMUM_HEIGHT) - final = TRUE + final_divide = TRUE // By design i guess, discarding branch discards rest with BYOND soft-GCing // There should never be anything else but SSquadtree referencing quadtrees, @@ -103,7 +103,7 @@ player_coords = list(p_coords) return TRUE - else if(!final && player_coords.len >= QUADTREE_CAPACITY) + else if(!final_divide && player_coords.len >= QUADTREE_CAPACITY) if(!is_divided) subdivide() if(nw_branch.insert_player(p_coords))