Fixed miscelaneous getLocation() issues and optimized some calls to avoid unnecessary copies

This commit is contained in:
Obique PSWG
2015-08-08 12:04:54 -05:00
parent 69c71e7e47
commit 68833935a5
6 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -408,7 +408,7 @@ public class ObjectManager extends Manager {
if (transform == null)
return;
Location newLocation = transform.getLocation();
newLocation.setTerrain(obj.getLocation().getTerrain());
newLocation.setTerrain(obj.getTerrain());
objectAwareness.move(obj, newLocation);
obj.sendDataTransforms(transform);
@@ -418,7 +418,7 @@ public class ObjectManager extends Manager {
private void moveObject(SWGObject obj, DataTransformWithParent transformWithParent) {
Location newLocation = transformWithParent.getLocation();
newLocation.setTerrain(obj.getLocation().getTerrain());
newLocation.setTerrain(obj.getTerrain());
SWGObject parent = objectMap.get(transformWithParent.getCellId());
if (parent == null) {
System.err.println("ObjectManager: Could not find parent for transform! Cell: " + transformWithParent.getCellId());