Added parent region checking to PRTree manager as per Dark_Arc's specifications.

This commit is contained in:
Wizjany 2012-10-21 19:33:30 -04:00 committed by sk89q
parent 0edb6e6157
commit 2c4d4708d8

View File

@ -122,6 +122,16 @@ public ApplicableRegionSet getApplicableRegions(Vector pt) {
for (ProtectedRegion region : tree.find(pointMBR)) {
if (region.contains(pt)) {
appRegions.add(region);
ProtectedRegion parent = region.getParent();
while (parent != null) {
if (!appRegions.contains(parent)) {
appRegions.add(parent);
}
parent = parent.getParent();
}
}
}