From 3ba5eeb6c3b7c6381ca1e0ed87bce44049f96e37 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 12 Apr 2011 22:15:40 +0100
Subject: Allow a null rotation to be passed in to RezObject so that we can
control whether to use the serialized rotation or not. Not used yet.
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 4370850..87b4cb8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2016,14 +2016,14 @@ namespace OpenSim.Region.Framework.Scenes
///
///
///
- ///
- ///
- ///
+ /// The position of the rezzed object.
+ /// The rotation of the rezzed object. If null, then the rotation stored with the object
+ /// will be used if it exists.
+ /// The velocity of the rezzed object.
///
/// The SceneObjectGroup rezzed or null if rez was unsuccessful
public virtual SceneObjectGroup RezObject(
- SceneObjectPart sourcePart, TaskInventoryItem item,
- Vector3 pos, Quaternion rot, Vector3 vel, int param)
+ SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param)
{
if (null == item)
return null;
@@ -2041,8 +2041,14 @@ namespace OpenSim.Region.Framework.Scenes
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
}
-
- AddNewSceneObject(group, true, pos, rot, vel);
+
+ AddNewSceneObject(group, true);
+
+ group.AbsolutePosition = pos;
+ group.Velocity = vel;
+
+ if (rot != null)
+ group.UpdateGroupRotationR((Quaternion)rot);
// We can only call this after adding the scene object, since the scene object references the scene
// to find out if scripts should be activated at all.
--
cgit v1.1