Fix issue #91.

This commit is contained in:
Major-
2015-08-31 15:22:16 +01:00
parent 5519eb50a9
commit 5376b08161
3 changed files with 3 additions and 9 deletions
@@ -337,7 +337,7 @@ public final class Region {
EntityType type = entity.getEntityType();
if (type == EntityType.STATIC_OBJECT) {
if (type == EntityType.STATIC_OBJECT) { // TODO set/clear collision matrix values
if (update == EntityUpdateType.REMOVE) {
removedObjects.get(height).add(message);
} else { // TODO should this really be possible?
@@ -179,7 +179,6 @@ public final class WalkingQueue {
RegionRepository repository = mob.getWorld().getRegionRepository();
Region region = repository.fromPosition(current);
Position previous = current;
for (int count = 0; count < max; count++) {
if (deltaX < 0) {
@@ -199,13 +198,7 @@ public final class WalkingQueue {
region = repository.fromPosition(step);
}
Direction direction = Direction.between(previous, step);
if (!region.traversable(step, EntityType.PLAYER, direction)) {
break;
}
points.add(step);
previous = step;
}
}
@@ -113,8 +113,9 @@ public final class AttributeMap {
private <T> Attribute<?> createAttribute(T value, AttributeType type) {
switch (type) {
case LONG:
return new NumericalAttribute((Long) value);
case DOUBLE:
return new NumericalAttribute((Integer) value);
return new NumericalAttribute((Double) value);
case STRING:
return new StringAttribute((String) value);
case SYMBOL: