EditSession: Fix hcyl height checks.

The height check was incorrect for certain height/position combinations,
causing the cyl to be the wrong length.

Closes #119
This commit is contained in:
Elizabeth Jennifer Myers 2011-08-05 15:34:05 -04:00
parent 8ea980a303
commit 4aa9f7d35b

View File

@ -1689,7 +1689,8 @@ public class EditSession {
pos = pos.subtract(0, height, 0);
}
if (pos.getBlockY() - height - 1 < 0) {
// Only do this check if height is negative --Elizabeth
if (height < 0 && pos.getBlockY() - height - 1 < 0) {
height = pos.getBlockY() + 1;
} else if (pos.getBlockY() + height - 1 > 127) {
height = 127 - pos.getBlockY() + 1;