From 5376b08161270e450a9eaf479035d4746ad02da8 Mon Sep 17 00:00:00 2001 From: Major- Date: Mon, 31 Aug 2015 15:22:16 +0100 Subject: [PATCH] Fix issue #91. --- game/src/main/org/apollo/game/model/area/Region.java | 2 +- .../main/org/apollo/game/model/entity/WalkingQueue.java | 7 ------- .../org/apollo/game/model/entity/attr/AttributeMap.java | 3 ++- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/game/src/main/org/apollo/game/model/area/Region.java b/game/src/main/org/apollo/game/model/area/Region.java index e2add931..695b8b13 100644 --- a/game/src/main/org/apollo/game/model/area/Region.java +++ b/game/src/main/org/apollo/game/model/area/Region.java @@ -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? diff --git a/game/src/main/org/apollo/game/model/entity/WalkingQueue.java b/game/src/main/org/apollo/game/model/entity/WalkingQueue.java index 857c866e..44fa4d0d 100644 --- a/game/src/main/org/apollo/game/model/entity/WalkingQueue.java +++ b/game/src/main/org/apollo/game/model/entity/WalkingQueue.java @@ -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; } } diff --git a/game/src/main/org/apollo/game/model/entity/attr/AttributeMap.java b/game/src/main/org/apollo/game/model/entity/attr/AttributeMap.java index b67d2386..5937274b 100644 --- a/game/src/main/org/apollo/game/model/entity/attr/AttributeMap.java +++ b/game/src/main/org/apollo/game/model/entity/attr/AttributeMap.java @@ -113,8 +113,9 @@ public final class AttributeMap { private 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: