Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

prebuild-update
Justin Clark-Casey (justincc) 2010-07-14 23:29:04 +01:00
commit 99a6950b30
17 changed files with 70 additions and 133 deletions

View File

@ -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

View File

@ -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();

View File

@ -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();

View File

@ -3,19 +3,10 @@
<Import assembly="OpenSim.Data.dll" />
<Import assembly="OpenSim.Framework.dll" />
</Runtime>
<ExtensionPoint path = "/OpenSim/GridData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IGridDataPlugin" />
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/LogData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.ILogDataPlugin" />
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/AssetData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IAssetDataPlugin" />
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/InventoryData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IInventoryDataPlugin" />
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/UserData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IUserDataPlugin" />
</ExtensionPoint>
</Addin>

View File

@ -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<UUID> users, List<Vector3> CoarseLocations);
void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
void SetChildAgentThrottle(byte[] throttle);
void SendAvatarDataImmediate(ISceneEntity avatar);

View File

@ -3678,30 +3678,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Primitive Packet/Data Sending Methods
/// <summary>
///
/// </summary>
/// <param name="localID"></param>
/// <param name="rotation"></param>
/// <param name="attachPoint"></param>
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);
}
}
}

View File

@ -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);
}
}

View File

@ -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)

View File

@ -73,7 +73,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos,
IClientAPI remoteClient, List<SurfaceTouchEventArgs> 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,

View File

@ -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)
{
}

View File

@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="rot"></param>
/// <param name="silent"></param>
void AttachObject(
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent);
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
/// <summary>
/// Attach an object to an avatar.
@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="silent"></param>
/// <returns>true if the object was successfully attached, false otherwise</returns>
bool AttachObject(
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent);
IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent);
/// <summary>
/// Rez an attachment from user inventory and change inventory status to match.

View File

@ -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);
}
}

View File

@ -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

View File

@ -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)
{

View File

@ -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)
{
}

View File

@ -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);
}
}

View File

@ -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)
{
}