55: Improved corner handling (Corners are now always inside a

PolygonalRegion)
This commit is contained in:
Valentin Churavy 2011-02-24 17:32:06 +01:00
parent 423f0199d0
commit cd599849b2

View File

@ -96,6 +96,10 @@ public boolean contains(Vector pt) {
for (i = 0; i < npoints; i++) {
xNew = points.get(i).getBlockX();
zNew = points.get(i).getBlockZ();
//Check for corner
if(xNew == targetX && zNew == targetZ){
return true;
}
if (xNew > xOld) {
x1 = xOld;
x2 = xNew;