mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 16:49:12 +00:00
Fix issue #91.
This commit is contained in:
@@ -337,7 +337,7 @@ public final class Region {
|
|||||||
|
|
||||||
EntityType type = entity.getEntityType();
|
EntityType type = entity.getEntityType();
|
||||||
|
|
||||||
if (type == EntityType.STATIC_OBJECT) {
|
if (type == EntityType.STATIC_OBJECT) { // TODO set/clear collision matrix values
|
||||||
if (update == EntityUpdateType.REMOVE) {
|
if (update == EntityUpdateType.REMOVE) {
|
||||||
removedObjects.get(height).add(message);
|
removedObjects.get(height).add(message);
|
||||||
} else { // TODO should this really be possible?
|
} else { // TODO should this really be possible?
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ public final class WalkingQueue {
|
|||||||
|
|
||||||
RegionRepository repository = mob.getWorld().getRegionRepository();
|
RegionRepository repository = mob.getWorld().getRegionRepository();
|
||||||
Region region = repository.fromPosition(current);
|
Region region = repository.fromPosition(current);
|
||||||
Position previous = current;
|
|
||||||
|
|
||||||
for (int count = 0; count < max; count++) {
|
for (int count = 0; count < max; count++) {
|
||||||
if (deltaX < 0) {
|
if (deltaX < 0) {
|
||||||
@@ -199,13 +198,7 @@ public final class WalkingQueue {
|
|||||||
region = repository.fromPosition(step);
|
region = repository.fromPosition(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
Direction direction = Direction.between(previous, step);
|
|
||||||
if (!region.traversable(step, EntityType.PLAYER, direction)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
points.add(step);
|
points.add(step);
|
||||||
previous = step;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,8 +113,9 @@ public final class AttributeMap {
|
|||||||
private <T> Attribute<?> createAttribute(T value, AttributeType type) {
|
private <T> Attribute<?> createAttribute(T value, AttributeType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case LONG:
|
case LONG:
|
||||||
|
return new NumericalAttribute((Long) value);
|
||||||
case DOUBLE:
|
case DOUBLE:
|
||||||
return new NumericalAttribute((Integer) value);
|
return new NumericalAttribute((Double) value);
|
||||||
case STRING:
|
case STRING:
|
||||||
return new StringAttribute((String) value);
|
return new StringAttribute((String) value);
|
||||||
case SYMBOL:
|
case SYMBOL:
|
||||||
|
|||||||
Reference in New Issue
Block a user