From 626c8a22cf66985dda17ddc7967d1ce05257a480 Mon Sep 17 00:00:00 2001 From: wallaceg09 Date: Wed, 13 Aug 2014 14:10:10 -0500 Subject: [PATCH] FIXED Waypoints defaulting to (0,0,0) ADDED Comment noting a likely bug in the Engine code --- src/resources/objects/intangible/IntangibleObject.java | 5 +++++ src/resources/objects/waypoint/WaypointObject.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/resources/objects/intangible/IntangibleObject.java b/src/resources/objects/intangible/IntangibleObject.java index df6843b3..8e056b0b 100644 --- a/src/resources/objects/intangible/IntangibleObject.java +++ b/src/resources/objects/intangible/IntangibleObject.java @@ -39,6 +39,11 @@ public class IntangibleObject extends SWGObject implements Serializable { private transient IntangibleMessageBuilder messageBuilder; + /* + * FIXME: [MINOR] The engine code doesn't appear to use the position passed to it (at least for waypoints). When passed a not-null position, + * the resulting Object comes back with a null position. The engine code in question is: engine.resource.objects.SWGObject + * The bug seems to be non-fatal but appears like it might cause a memory leak. + */ public IntangibleObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { super(objectID, planet, position, orientation, Template); } diff --git a/src/resources/objects/waypoint/WaypointObject.java b/src/resources/objects/waypoint/WaypointObject.java index eea06d61..0d1ddc0c 100644 --- a/src/resources/objects/waypoint/WaypointObject.java +++ b/src/resources/objects/waypoint/WaypointObject.java @@ -43,7 +43,7 @@ public class WaypointObject extends IntangibleObject implements IDelta, Serializ public static final byte BLUE = 1, GREEN = 2, ORANGE = 3, YELLOW = 4, PURPLE = 5, WHITE = 6, MULTICOLOR = 7; public WaypointObject(long objectID, Planet planet, Point3D position) { - super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(0, 0, 0, 1), "object/waypoint/shared_waypoint.iff"); + super(objectID, planet, position, new Quaternion(0, 0, 0, 1), "object/waypoint/shared_waypoint.iff"); } public WaypointObject() {