Now translates buildouts according to the buildout area it's in

This commit is contained in:
Obique PSWG
2016-03-04 16:11:44 -06:00
parent 0083ba012b
commit 941336c7b6
2 changed files with 9 additions and 5 deletions
+2 -4
View File
@@ -198,12 +198,10 @@ public class ObjectAwareness extends Service {
transform.setSpeed((float) (obj.getMovementScale()*7.3));
}
BuildoutArea area = obj.getBuildoutArea();
if (area != null && area.isAdjustCoordinates())
newLocation.translatePosition(area.getX1(), 0, area.getZ1());
area.adjustLocation(newLocation);
new PlayerTransformedIntent(obj, obj.getParent(), null, obj.getLocation(), newLocation).broadcast();
move(obj, newLocation, true);
if (area != null && area.isAdjustCoordinates())
newLocation.translatePosition(-area.getX1(), 0, -area.getZ1());
area.readjustLocation(newLocation);
obj.sendDataTransforms(transform);
}