Major attachments cleanup. Remove unused AttachObject ClientView method
Clean up use of AttachObject throughout, reduce number of overloads and number of parametersavinationmerge
parent
0c445239a6
commit
bebbe407ee
|
@ -1047,11 +1047,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
|
||||
|
|
|
@ -602,11 +602,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();
|
||||
|
|
|
@ -608,11 +608,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();
|
||||
|
|
|
@ -1019,7 +1019,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);
|
||||
|
|
|
@ -3687,30 +3687,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)
|
||||
|
|
|
@ -71,6 +71,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
get { return false; }
|
||||
}
|
||||
|
||||
// Called by client
|
||||
//
|
||||
public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent)
|
||||
{
|
||||
m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject");
|
||||
|
@ -86,7 +88,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
return;
|
||||
|
||||
// Calls attach with a Zero position
|
||||
if (AttachObject(remoteClient, objectLocalID, AttachmentPt, Vector3.Zero, false))
|
||||
if (AttachObject(remoteClient, part.ParentGroup, AttachmentPt, false))
|
||||
{
|
||||
m_scene.EventManager.TriggerOnAttach(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId);
|
||||
|
||||
|
@ -108,12 +110,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
}
|
||||
}
|
||||
|
||||
public bool AttachObject(
|
||||
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Vector3 attachPos, bool silent)
|
||||
{
|
||||
SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID);
|
||||
if (group != null)
|
||||
public bool AttachObject(IClientAPI remoteClient, SceneObjectGroup group, uint AttachmentPt, bool silent)
|
||||
{
|
||||
Vector3 attachPos = group.AbsolutePosition;
|
||||
|
||||
if (m_scene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
// If the attachment point isn't the same as the one previously used
|
||||
|
@ -170,12 +170,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("[ATTACHMENTS MODULE]: AttachObject found no such scene object {0}", objectLocalID);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -245,8 +239,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
|
||||
tainted = true;
|
||||
|
||||
AttachObject(
|
||||
remoteClient, objatt.LocalId, AttachmentPt, objatt.AbsolutePosition, false);
|
||||
AttachObject(remoteClient, objatt, AttachmentPt, false);
|
||||
//objatt.ScheduleGroupForFullUpdate();
|
||||
|
||||
if (tainted)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -58,7 +58,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, 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.
|
||||
|
|
|
@ -2632,8 +2632,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
|
||||
|
||||
if (AttachmentsModule != null)
|
||||
AttachmentsModule.AttachObject(
|
||||
sp.ControllingClient, grp.LocalId, (uint)0, grp.AbsolutePosition, false);
|
||||
AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false);
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1064,11 +1064,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
|
||||
}
|
||||
|
||||
public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SendAvatarDataImmediate(ISceneEntity avatar)
|
||||
{
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -3160,15 +3160,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
|
||||
|
||||
/*
|
||||
IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
|
||||
if (attachmentsModule != null)
|
||||
{
|
||||
attachmentsModule.AttachObject(
|
||||
presence.ControllingClient, grp.LocalId,
|
||||
(uint)attachment, Quaternion.Identity, Vector3.Zero, false);
|
||||
}
|
||||
*/
|
||||
grp.AttachToAgent(m_host.OwnerID, (uint)attachment, Vector3.Zero, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue