diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index fa1f0d8614..65921a2c00 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -1035,11 +1035,6 @@ namespace OpenSim.Client.MXP.ClientStack
// Minimap function, not used.
}
- public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- // Need to translate to MXP somehow
- }
-
public void SetChildAgentThrottle(byte[] throttle)
{
// Need to translate to MXP somehow
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
index cf7aaf2313..b808e95073 100644
--- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
+++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
@@ -593,11 +593,6 @@ namespace OpenSim.Client.Sirikata.ClientStack
throw new System.NotImplementedException();
}
- public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- throw new System.NotImplementedException();
- }
-
public void SetChildAgentThrottle(byte[] throttle)
{
throw new System.NotImplementedException();
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index ab23484454..a6c490b2bc 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -599,11 +599,6 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
throw new System.NotImplementedException();
}
- public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- throw new System.NotImplementedException();
- }
-
public void SetChildAgentThrottle(byte[] throttle)
{
throw new System.NotImplementedException();
diff --git a/OpenSim/Data/Resources/OpenSim.Data.addin.xml b/OpenSim/Data/Resources/OpenSim.Data.addin.xml
index 65774ffc4f..10c9c3cb28 100644
--- a/OpenSim/Data/Resources/OpenSim.Data.addin.xml
+++ b/OpenSim/Data/Resources/OpenSim.Data.addin.xml
@@ -3,19 +3,10 @@
-
-
-
-
-
-
-
-
-
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 556a53260b..db745481bc 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework
RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects);
public delegate void ObjectAttach(
- IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent);
+ IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
public delegate void ModifyTerrain(UUID user,
float height, float seconds, byte size, byte action, float north, float west, float south, float east,
@@ -1017,7 +1017,6 @@ namespace OpenSim.Framework
void SendCoarseLocationUpdate(List users, List CoarseLocations);
- void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
void SetChildAgentThrottle(byte[] throttle);
void SendAvatarDataImmediate(ISceneEntity avatar);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 540fccc489..0aec01a021 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3678,30 +3678,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Primitive Packet/Data Sending Methods
- ///
- ///
- ///
- ///
- ///
- ///
- public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- if (attachPoint > 30 && ownerID != AgentId) // Someone else's HUD
- return;
-
- ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach);
- // TODO: don't create new blocks if recycling an old packet
- attach.AgentData.AgentID = AgentId;
- attach.AgentData.SessionID = m_sessionId;
- attach.AgentData.AttachmentPoint = attachPoint;
- attach.ObjectData = new ObjectAttachPacket.ObjectDataBlock[1];
- attach.ObjectData[0] = new ObjectAttachPacket.ObjectDataBlock();
- attach.ObjectData[0].ObjectLocalID = localID;
- attach.ObjectData[0].Rotation = rotation;
- attach.Header.Zerocoded = true;
- OutPacket(attach, ThrottleOutPacketType.Task);
- }
-
void HandleQueueEmpty(ThrottleOutPacketTypeFlags categories)
{
if ((categories & ThrottleOutPacketTypeFlags.Task) != 0)
@@ -5731,7 +5707,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
if (att.ObjectData.Length > 0)
{
- handlerObjectAttach(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation, false);
+ handlerObjectAttach(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, false);
}
}
}
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index d30e954a10..3d6e7f31a7 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -182,7 +182,13 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
if (part.Inventory.UpdateInventoryItem(item))
{
- remoteClient.SendAgentAlertMessage("Notecard saved", false);
+ if ((InventoryType)item.InvType == InventoryType.Notecard)
+ remoteClient.SendAgentAlertMessage("Notecard saved", false);
+ else if ((InventoryType)item.InvType == InventoryType.LSL)
+ remoteClient.SendAgentAlertMessage("Script saved", false);
+ else
+ remoteClient.SendAgentAlertMessage("Item saved", false);
+
part.GetProperties(remoteClient);
}
}
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index a7b4c66d2b..527934d729 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -69,7 +69,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
get { return false; }
}
- public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent)
+ // Called by client
+ //
+ public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent)
{
m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject");
@@ -84,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return;
// Calls attach with a Zero position
- if (AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false))
+ if (AttachObject(remoteClient, part.ParentGroup, AttachmentPt, false))
{
m_scene.EventManager.TriggerOnAttach(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId);
@@ -106,72 +108,64 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
}
- public bool AttachObject(
- IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)
+ public bool AttachObject(IClientAPI remoteClient, SceneObjectGroup group, uint AttachmentPt, bool silent)
{
- SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID);
- if (group != null)
+ Vector3 attachPos = group.AbsolutePosition;
+
+ if (m_scene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
{
- if (m_scene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
+ // If the attachment point isn't the same as the one previously used
+ // set it's offset position = 0 so that it appears on the attachment point
+ // and not in a weird location somewhere unknown.
+ if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint())
{
- // If the attachment point isn't the same as the one previously used
- // set it's offset position = 0 so that it appears on the attachment point
- // and not in a weird location somewhere unknown.
- if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint())
- {
- attachPos = Vector3.Zero;
- }
+ attachPos = Vector3.Zero;
+ }
- // AttachmentPt 0 means the client chose to 'wear' the attachment.
- if (AttachmentPt == 0)
- {
- // Check object for stored attachment point
- AttachmentPt = (uint)group.GetAttachmentPoint();
- }
+ // AttachmentPt 0 means the client chose to 'wear' the attachment.
+ if (AttachmentPt == 0)
+ {
+ // Check object for stored attachment point
+ AttachmentPt = (uint)group.GetAttachmentPoint();
+ }
- // if we still didn't find a suitable attachment point.......
- if (AttachmentPt == 0)
- {
- // Stick it on left hand with Zero Offset from the attachment point.
- AttachmentPt = (uint)AttachmentPoint.LeftHand;
- attachPos = Vector3.Zero;
- }
+ // if we still didn't find a suitable attachment point.......
+ if (AttachmentPt == 0)
+ {
+ // Stick it on left hand with Zero Offset from the attachment point.
+ AttachmentPt = (uint)AttachmentPoint.LeftHand;
+ attachPos = Vector3.Zero;
+ }
- group.SetAttachmentPoint((byte)AttachmentPt);
- group.AbsolutePosition = attachPos;
+ group.SetAttachmentPoint((byte)AttachmentPt);
+ group.AbsolutePosition = attachPos;
- // Saves and gets itemID
- UUID itemId;
+ // Saves and gets itemID
+ UUID itemId;
- if (group.GetFromItemID() == UUID.Zero)
- {
- m_scene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
- }
- else
- {
- itemId = group.GetFromItemID();
- }
-
- SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemId, group);
-
- group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
-
- // In case it is later dropped again, don't let
- // it get cleaned up
- group.RootPart.RemFlag(PrimFlags.TemporaryOnRez);
- group.HasGroupChanged = false;
+ if (group.GetFromItemID() == UUID.Zero)
+ {
+ m_scene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
}
else
{
- remoteClient.SendAgentAlertMessage(
- "You don't have sufficient permissions to attach this object", false);
-
- return false;
+ itemId = group.GetFromItemID();
}
+
+ SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemId, group);
+
+ group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
+
+ // In case it is later dropped again, don't let
+ // it get cleaned up
+ group.RootPart.RemFlag(PrimFlags.TemporaryOnRez);
+ group.HasGroupChanged = false;
}
else
{
- m_log.DebugFormat("[ATTACHMENTS MODULE]: AttachObject found no such scene object {0}", objectLocalID);
+ remoteClient.SendAgentAlertMessage(
+ "You don't have sufficient permissions to attach this object", false);
+
return false;
}
@@ -237,8 +231,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
tainted = true;
- AttachObject(
- remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
+ AttachObject(remoteClient, objatt, AttachmentPt, false);
//objatt.ScheduleGroupForFullUpdate();
if (tainted)
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
index 6e699025b1..00f6918600 100644
--- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos,
IClientAPI remoteClient, List surfaceArgs) { this.Stale = true; };
client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt,
- Quaternion rot, bool silent) { this.Stale = true; };
+ bool silent) { this.Stale = true; };
client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID,
UUID GroupID) { this.Stale = true; };
client.OnObjectDuplicateOnRay += delegate(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index af9df45bf7..f6e6163301 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -536,10 +536,6 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
- public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- }
-
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{
}
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index f8af36756c..2af25481e4 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Interfaces
///
///
void AttachObject(
- IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent);
+ IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
///
/// Attach an object to an avatar.
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Interfaces
///
/// true if the object was successfully attached, false otherwise
bool AttachObject(
- IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent);
+ IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent);
///
/// Rez an attachment from user inventory and change inventory status to match.
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 25786851cb..6e73fe920f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1343,7 +1343,13 @@ namespace OpenSim.Region.Framework.Scenes
}
if (part.Inventory.UpdateInventoryItem(itemInfo))
{
- remoteClient.SendAgentAlertMessage("Notecard saved", false);
+ if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
+ remoteClient.SendAgentAlertMessage("Notecard saved", false);
+ else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
+ remoteClient.SendAgentAlertMessage("Script saved", false);
+ else
+ remoteClient.SendAgentAlertMessage("Item saved", false);
+
part.GetProperties(remoteClient);
}
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 40176ec7a6..b0f4ac0da8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2571,8 +2571,7 @@ namespace OpenSim.Region.Framework.Scenes
RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
if (AttachmentsModule != null)
- AttachmentsModule.AttachObject(
- sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
+ AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false);
}
else
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 754b925bb8..ee7aa2da8d 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1055,11 +1055,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
}
- public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
-
- }
-
public void SendAvatarDataImmediate(ISceneEntity avatar)
{
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 12d6643e23..2e0450cf76 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -627,10 +627,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
- public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- }
-
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c5226bad4a..dbea6eff3b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2940,9 +2940,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
if (attachmentsModule != null)
- attachmentsModule.AttachObject(
- presence.ControllingClient, grp.LocalId,
- (uint)attachment, Quaternion.Identity, Vector3.Zero, false);
+ attachmentsModule.AttachObject(presence.ControllingClient,
+ grp, (uint)attachment, false);
}
}
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 496cfb854b..999cf5e56d 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -630,10 +630,6 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- }
-
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{
}