Skip to content

Commit

Permalink
final(ly)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Oct 26, 2023
1 parent 11c020e commit ae11502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/datums/quadtree.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit ae11502

Please sign in to comment.