mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-07-31 01:15:50 -04:00
Created new Quaternion and Point3D classes for the Location. Will require an ODB wipe!
This commit is contained in:
@@ -211,18 +211,26 @@ public class ObjectManager extends Manager {
|
||||
if (!(obj instanceof CreatureObject) || ((CreatureObject) obj).getPlayerObject() == null)
|
||||
objectAwareness.add(obj);
|
||||
objectMap.put(obj.getObjectId(), obj);
|
||||
if (obj.getParent() != null && obj.getParent().isBuildout()) {
|
||||
long id = obj.getParent().getObjectId();
|
||||
obj.getParent().removeObject(obj);
|
||||
SWGObject parent = objectMap.get(id);
|
||||
if (parent != null)
|
||||
parent.addObject(obj);
|
||||
else {
|
||||
System.err.println("Parent for " + obj + " is null! ParentID: " + id);
|
||||
Log.e("ObjectManager", "Parent for %s is null! ParentID: %d", obj, id);
|
||||
updateBuildoutParent(obj);
|
||||
addChildrenObjects(obj);
|
||||
}
|
||||
|
||||
private void updateBuildoutParent(SWGObject obj) {
|
||||
if (obj.getParent() != null) {
|
||||
if (obj.getParent().isBuildout()) {
|
||||
long id = obj.getParent().getObjectId();
|
||||
obj.getParent().removeObject(obj);
|
||||
SWGObject parent = objectMap.get(id);
|
||||
if (parent != null)
|
||||
parent.addObject(obj);
|
||||
else {
|
||||
System.err.println("Parent for " + obj + " is null! ParentID: " + id);
|
||||
Log.e("ObjectManager", "Parent for %s is null! ParentID: %d", obj, id);
|
||||
}
|
||||
} else {
|
||||
updateBuildoutParent(obj.getParent());
|
||||
}
|
||||
}
|
||||
addChildrenObjects(obj);
|
||||
}
|
||||
|
||||
private void addChildrenObjects(SWGObject obj) {
|
||||
|
||||
Reference in New Issue
Block a user