Added /movefurniture & /rotatefurniture, see ext.

The permission system thing I'm doing needs to be adjusted to the
Container permission system in the Engine.

To Light:  Please contact me in regards to this
This commit is contained in:
Seefo
2014-04-09 19:53:11 -04:00
parent 399cf7a535
commit 70b7507bb0
5 changed files with 106 additions and 7 deletions
+21
View File
@@ -886,6 +886,24 @@ public class SimulationService implements INetworkDispatch {
}
public void transform(TangibleObject obj, Point3D position)
{
Point3D oldPosition = obj.getPosition();
Point3D newPosition = new Point3D(oldPosition.x + position.x, oldPosition.y + position.y, oldPosition.z + position.z);
teleport(obj, newPosition, obj.getOrientation(), obj.getParentId());
}
public void transform(SWGObject obj, float rotation, Point3D axis)
{
rotation *= (Math.PI / 180);
Quaternion oldRotation = obj.getOrientation();
Quaternion newRotation = resources.common.MathUtilities.rotateQuaternion(oldRotation, rotation, axis);
teleport(obj, obj.getPosition(), newRotation, obj.getParentId());
}
public void teleport(SWGObject obj, Point3D position, Quaternion orientation, long cellId) {
if(cellId == 0) {
@@ -900,6 +918,9 @@ public class SimulationService implements INetworkDispatch {
DataTransformWithParent dataTransform = new DataTransformWithParent(new Point3D(position.x, position.y, position.z), orientation, obj.getMovementCounter(), obj.getObjectID(), cellId);
ObjControllerMessage objController = new ObjControllerMessage(0x1B, dataTransform);
obj.notifyObservers(objController, true);
obj.setPosition(position);
obj.setOrientation(orientation);
}
}