Fix bug where approximately half the time, attachments would rez only their root prim until right clicked (or otherwise updated).
The root cause of this problem was that multiple ObjectUpdates were being sent on attachment which differed enough to confuse the client. Sometimes these would eliminate each other and sometimes not, depending on whether the scheduler looked at the queued updates. The solution here is to only schedule the ObjectUpdate once the attachment code has done all it needs to do.slimupdates
parent
660ebe52cf
commit
edb176447b
|
@ -411,6 +411,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rez an object into the scene from the user's inventory
|
/// Rez an object into the scene from the user's inventory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// FIXME: It would be really nice if inventory access modules didn't also actually do the work of rezzing
|
||||||
|
/// things to the scene. The caller should be doing that, I think.
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="itemID"></param>
|
/// <param name="itemID"></param>
|
||||||
/// <param name="RayEnd"></param>
|
/// <param name="RayEnd"></param>
|
||||||
|
@ -500,13 +502,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
group.RootPart.IsAttachment = true;
|
group.RootPart.IsAttachment = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Scene.AddNewSceneObject(group, true);
|
// For attachments, we must make sure that only a single object update occurs after we've finished
|
||||||
|
// all the necessary operations.
|
||||||
|
m_Scene.AddNewSceneObject(group, true, false);
|
||||||
|
|
||||||
// m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z);
|
// m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z);
|
||||||
// if attachment we set it's asset id so object updates can reflect that
|
// if attachment we set it's asset id so object updates can reflect that
|
||||||
// if not, we set it's position in world.
|
// if not, we set it's position in world.
|
||||||
if (!attachment)
|
if (!attachment)
|
||||||
{
|
{
|
||||||
|
group.ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
float offsetHeight = 0;
|
float offsetHeight = 0;
|
||||||
pos = m_Scene.GetNewRezLocation(
|
pos = m_Scene.GetNewRezLocation(
|
||||||
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
|
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
|
||||||
|
@ -562,6 +568,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
part.GroupMask = 0; // DO NOT propagate here
|
part.GroupMask = 0; // DO NOT propagate here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
group.ApplyNextOwnerPermissions();
|
group.ApplyNextOwnerPermissions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -591,10 +598,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
{
|
{
|
||||||
group.ClearPartAttachmentData();
|
group.ClearPartAttachmentData();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!attachment)
|
|
||||||
{
|
|
||||||
// Fire on_rez
|
// Fire on_rez
|
||||||
group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 0);
|
group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 0);
|
||||||
|
|
||||||
|
|
|
@ -1842,9 +1842,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
EventManager.TriggerOnAttach(localID, itemID, avatarID);
|
EventManager.TriggerOnAttach(localID, itemID, avatarID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID,
|
/// <summary>
|
||||||
uint AttachmentPt)
|
/// Called when the client receives a request to rez a single attachment on to the avatar from inventory
|
||||||
|
/// (RezSingleAttachmentFromInv packet).
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="AttachmentPt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat("[USER INVENTORY]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name);
|
||||||
|
|
||||||
SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt);
|
SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt);
|
||||||
|
|
||||||
if (att == null)
|
if (att == null)
|
||||||
|
@ -1856,9 +1865,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt);
|
return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID RezSingleAttachment(SceneObjectGroup att,
|
/// <summary>
|
||||||
IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
|
/// Update the user inventory to reflect an attachment
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="att"></param>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="AttachmentPt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public UUID RezSingleAttachment(SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[USER INVENTORY]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
|
||||||
|
remoteClient.Name, att.Name, itemID);
|
||||||
|
|
||||||
if (!att.IsDeleted)
|
if (!att.IsDeleted)
|
||||||
AttachmentPt = att.RootPart.AttachmentPoint;
|
AttachmentPt = att.RootPart.AttachmentPoint;
|
||||||
|
|
||||||
|
@ -1897,8 +1917,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent);
|
return m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This registers the item as attached in a user's inventory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="AttachmentPt"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="att"></param>
|
||||||
public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
|
public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
|
||||||
|
// att.Name, remoteClient.Name, AttachmentPt, itemID);
|
||||||
|
|
||||||
if (UUID.Zero == itemID)
|
if (UUID.Zero == itemID)
|
||||||
{
|
{
|
||||||
m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID.");
|
m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID.");
|
||||||
|
@ -1926,10 +1957,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */);
|
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */);
|
||||||
|
|
||||||
if (m_AvatarFactory != null)
|
if (m_AvatarFactory != null)
|
||||||
{
|
|
||||||
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2012,6 +2040,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
sog.SetOwnerId(ownerID);
|
sog.SetOwnerId(ownerID);
|
||||||
sog.SetGroup(groupID, remoteClient);
|
sog.SetGroup(groupID, remoteClient);
|
||||||
|
sog.ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
foreach (SceneObjectPart child in sog.Children.Values)
|
foreach (SceneObjectPart child in sog.Children.Values)
|
||||||
child.Inventory.ChangeInventoryOwner(ownerID);
|
child.Inventory.ChangeInventoryOwner(ownerID);
|
||||||
|
@ -2033,6 +2062,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sog.SetOwnerId(groupID);
|
sog.SetOwnerId(groupID);
|
||||||
sog.ApplyNextOwnerPermissions();
|
sog.ApplyNextOwnerPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (uint localID in localIDs)
|
foreach (uint localID in localIDs)
|
||||||
|
|
|
@ -1906,14 +1906,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
|
// "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
|
||||||
|
|
||||||
|
SceneObjectGroup sceneObject = null;
|
||||||
|
|
||||||
// If an entity creator has been registered for this prim type then use that
|
// If an entity creator has been registered for this prim type then use that
|
||||||
if (m_entityCreators.ContainsKey((PCode)shape.PCode))
|
if (m_entityCreators.ContainsKey((PCode)shape.PCode))
|
||||||
return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
|
{
|
||||||
|
sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Otherwise, use this default creation code;
|
||||||
|
sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
|
||||||
|
AddNewSceneObject(sceneObject, true);
|
||||||
|
sceneObject.SetGroup(groupID, null);
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, use this default creation code;
|
sceneObject.ScheduleGroupForFullUpdate();
|
||||||
SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
|
|
||||||
AddNewSceneObject(sceneObject, true);
|
|
||||||
sceneObject.SetGroup(groupID, null);
|
|
||||||
|
|
||||||
return sceneObject;
|
return sceneObject;
|
||||||
}
|
}
|
||||||
|
@ -1941,7 +1949,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a newly created object to the scene
|
/// Add a newly created object to the scene. Updates are also sent to viewers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
/// <param name="attachToBackup">
|
/// <param name="attachToBackup">
|
||||||
|
@ -1950,7 +1958,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </param>
|
/// </param>
|
||||||
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
||||||
{
|
{
|
||||||
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup);
|
return AddNewSceneObject(sceneObject, attachToBackup, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a newly created object to the scene
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sceneObject"></param>
|
||||||
|
/// <param name="attachToBackup">
|
||||||
|
/// If true, the object is made persistent into the scene.
|
||||||
|
/// If false, the object will not persist over server restarts
|
||||||
|
/// </param>
|
||||||
|
/// <param name="sendClientUpdates">
|
||||||
|
/// If true, updates for the new scene object are sent to all viewers in range.
|
||||||
|
/// If false, it is left to the caller to schedule the update
|
||||||
|
/// </param>
|
||||||
|
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||||
|
{
|
||||||
|
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3143,7 +3168,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
|
m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
|
||||||
m_sceneGridService.KiPrimitive += SendKillObject;
|
m_sceneGridService.KiPrimitive += SendKillObject;
|
||||||
m_sceneGridService.OnGetLandData += GetLandData;
|
m_sceneGridService.OnGetLandData += GetLandData;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -229,7 +229,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sceneObject.HasGroupChanged = true;
|
sceneObject.HasGroupChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddSceneObject(sceneObject, attachToBackup);
|
return AddSceneObject(sceneObject, attachToBackup, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -244,12 +244,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the object was added, false if an object with the same uuid was already in the scene
|
/// true if the object was added, false if an object with the same uuid was already in the scene
|
||||||
/// </returns>
|
/// </returns>
|
||||||
protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||||
{
|
{
|
||||||
// Ensure that we persist this new scene object
|
// Ensure that we persist this new scene object
|
||||||
sceneObject.HasGroupChanged = true;
|
sceneObject.HasGroupChanged = true;
|
||||||
|
|
||||||
return AddSceneObject(sceneObject, attachToBackup);
|
return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -261,13 +261,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// If true, the object is made persistent into the scene.
|
/// If true, the object is made persistent into the scene.
|
||||||
/// If false, the object will not persist over server restarts
|
/// If false, the object will not persist over server restarts
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>true if the object was added, false if an object with the same uuid was already in the scene
|
/// <param name="sendClientUpdates">
|
||||||
|
/// If true, updates for the new scene object are sent to all viewers in range.
|
||||||
|
/// If false, it is left to the caller to schedule the update
|
||||||
|
/// </param>
|
||||||
|
/// <returns>
|
||||||
|
/// true if the object was added, false if an object with the same uuid was already in the scene
|
||||||
/// </returns>
|
/// </returns>
|
||||||
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||||
{
|
{
|
||||||
if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero)
|
if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
bool alreadyExisted = false;
|
||||||
|
|
||||||
if (m_parentScene.m_clampPrimSize)
|
if (m_parentScene.m_clampPrimSize)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in sceneObject.Children.Values)
|
foreach (SceneObjectPart part in sceneObject.Children.Values)
|
||||||
|
@ -287,6 +294,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
sceneObject.AttachToScene(m_parentScene);
|
sceneObject.AttachToScene(m_parentScene);
|
||||||
|
|
||||||
|
if (sendClientUpdates)
|
||||||
|
sceneObject.ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
lock (sceneObject)
|
lock (sceneObject)
|
||||||
{
|
{
|
||||||
if (!Entities.ContainsKey(sceneObject.UUID))
|
if (!Entities.ContainsKey(sceneObject.UUID))
|
||||||
|
@ -310,12 +320,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroupsByLocalID[part.LocalId] = sceneObject;
|
SceneObjectGroupsByLocalID[part.LocalId] = sceneObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
else
|
||||||
|
{
|
||||||
|
alreadyExisted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return alreadyExisted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -525,6 +537,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
|
itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
|
||||||
false, false, remoteClient.AgentId, true);
|
false, false, remoteClient.AgentId, true);
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}",
|
||||||
|
// objatt.Name, remoteClient.Name, AttachmentPt);
|
||||||
|
|
||||||
if (objatt != null)
|
if (objatt != null)
|
||||||
{
|
{
|
||||||
|
@ -533,7 +548,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
tainted = true;
|
tainted = true;
|
||||||
|
|
||||||
AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
|
AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
|
||||||
objatt.ScheduleGroupForFullUpdate();
|
//objatt.ScheduleGroupForFullUpdate();
|
||||||
if (tainted)
|
if (tainted)
|
||||||
objatt.HasGroupChanged = true;
|
objatt.HasGroupChanged = true;
|
||||||
|
|
||||||
|
@ -544,8 +559,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Do this last so that event listeners have access to all the effects of the attachment
|
// Do this last so that event listeners have access to all the effects of the attachment
|
||||||
m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
|
m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[SCENE GRAPH]: Could not retrieve item {0} for attaching to avatar {1} at point {2}",
|
||||||
|
itemID, remoteClient.Name, AttachmentPt);
|
||||||
|
}
|
||||||
|
|
||||||
return objatt;
|
return objatt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -568,7 +568,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
ApplyPhysics(m_scene.m_physicalPrim);
|
ApplyPhysics(m_scene.m_physicalPrim);
|
||||||
|
|
||||||
ScheduleGroupForFullUpdate();
|
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||||
|
// for the same object with very different properties. The caller must schedule the update.
|
||||||
|
//ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GroupScale()
|
public Vector3 GroupScale()
|
||||||
|
@ -956,10 +958,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// don't attach attachments to child agents
|
// don't attach attachments to child agents
|
||||||
if (avatar.IsChildAgent) return;
|
if (avatar.IsChildAgent) return;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
|
||||||
|
|
||||||
DetachFromBackup();
|
DetachFromBackup();
|
||||||
|
|
||||||
// Remove from database and parcel prim count
|
// Remove from database and parcel prim count
|
||||||
//
|
|
||||||
m_scene.DeleteFromStorage(UUID);
|
m_scene.DeleteFromStorage(UUID);
|
||||||
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
||||||
|
|
||||||
|
@ -985,7 +988,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SetAttachmentPoint(Convert.ToByte(attachmentpoint));
|
SetAttachmentPoint(Convert.ToByte(attachmentpoint));
|
||||||
|
|
||||||
avatar.AddAttachment(this);
|
avatar.AddAttachment(this);
|
||||||
m_log.Debug("[SOG]: Added attachment " + UUID + " to avatar " + avatar.UUID);
|
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
{
|
{
|
||||||
|
@ -1002,6 +1004,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScheduleGroupForFullUpdate();
|
ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
|
||||||
|
UUID, agentID, Scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte GetAttachmentPoint()
|
public byte GetAttachmentPoint()
|
||||||
|
@ -1986,6 +1994,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void ScheduleFullUpdateToAvatar(ScenePresence presence)
|
public void ScheduleFullUpdateToAvatar(ScenePresence presence)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
|
||||||
|
|
||||||
RootPart.AddFullUpdateToAvatar(presence);
|
RootPart.AddFullUpdateToAvatar(presence);
|
||||||
|
|
||||||
lock (m_parts)
|
lock (m_parts)
|
||||||
|
@ -2000,6 +2010,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void ScheduleTerseUpdateToAvatar(ScenePresence presence)
|
public void ScheduleTerseUpdateToAvatar(ScenePresence presence)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
|
||||||
|
|
||||||
lock (m_parts)
|
lock (m_parts)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
|
@ -2014,6 +2026,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleGroupForFullUpdate()
|
public void ScheduleGroupForFullUpdate()
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID);
|
||||||
|
|
||||||
checkAtTargets();
|
checkAtTargets();
|
||||||
RootPart.ScheduleFullUpdate();
|
RootPart.ScheduleFullUpdate();
|
||||||
|
|
||||||
|
@ -2032,6 +2046,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleGroupForTerseUpdate()
|
public void ScheduleGroupForTerseUpdate()
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID);
|
||||||
|
|
||||||
lock (m_parts)
|
lock (m_parts)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
|
@ -2049,6 +2065,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (IsDeleted)
|
if (IsDeleted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID);
|
||||||
|
|
||||||
RootPart.SendFullUpdateToAllClients();
|
RootPart.SendFullUpdateToAllClients();
|
||||||
|
|
||||||
lock (m_parts)
|
lock (m_parts)
|
||||||
|
@ -2064,7 +2082,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Immediately send an update for this scene object's root prim only.
|
/// Immediately send an update for this scene object's root prim only.
|
||||||
/// This is for updates regarding the object as a whole, and none of its parts in particular.
|
/// This is for updates regarding the object as a whole, and none of its parts in particular.
|
||||||
/// Note: this may not be cused by opensim (it probably should) but it's used by
|
/// Note: this may not be used by opensim (it probably should) but it's used by
|
||||||
/// external modules.
|
/// external modules.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendGroupRootTerseUpdate()
|
public void SendGroupRootTerseUpdate()
|
||||||
|
@ -2079,6 +2097,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (m_scene == null) // Need to check here as it's null during object creation
|
if (m_scene == null) // Need to check here as it's null during object creation
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_scene.SceneGraph.AddToUpdateList(this);
|
m_scene.SceneGraph.AddToUpdateList(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3557,7 +3576,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
HasGroupChanged = true;
|
HasGroupChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScheduleGroupForFullUpdate();
|
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||||
|
// for the same object with very different properties. The caller must schedule the update.
|
||||||
|
//ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerScriptChangedEvent(Changed val)
|
public void TriggerScriptChangedEvent(Changed val)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<log4net>
|
<log4net>
|
||||||
<appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
|
<appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
|
||||||
<layout type="log4net.Layout.PatternLayout">
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
<conversionPattern value="%date{HH:mm:ss} - %message" />
|
<conversionPattern value="%date{HH:mm:ss,fff} - %message" />
|
||||||
</layout>
|
</layout>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|
|
@ -31,14 +31,14 @@
|
||||||
|
|
||||||
[AvatarService]
|
[AvatarService]
|
||||||
LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
|
LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
|
||||||
ConnectionString = "URI=file:avatars.db,version=3"
|
; ConnectionString = "URI=file:avatars.db,version=3"
|
||||||
|
|
||||||
[AuthorizationService]
|
[AuthorizationService]
|
||||||
LocalServiceModule = "OpenSim.Services.AuthorizationService.dll:AuthorizationService"
|
LocalServiceModule = "OpenSim.Services.AuthorizationService.dll:AuthorizationService"
|
||||||
|
|
||||||
[AuthenticationService]
|
[AuthenticationService]
|
||||||
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||||
ConnectionString = "URI=file:auth.db,version=3"
|
; ConnectionString = "URI=file:auth.db,version=3"
|
||||||
|
|
||||||
[GridService]
|
[GridService]
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
[UserAccountService]
|
[UserAccountService]
|
||||||
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
||||||
ConnectionString = "URI=file:userprofiles.db,version=3"
|
; ConnectionString = "URI=file:userprofiles.db,version=3"
|
||||||
;; These are for creating new accounts
|
;; These are for creating new accounts
|
||||||
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||||
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
|
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
[FriendsService]
|
[FriendsService]
|
||||||
LocalServiceModule = "OpenSim.Services.FriendsService.dll"
|
LocalServiceModule = "OpenSim.Services.FriendsService.dll"
|
||||||
ConnectionString = "URI=file:friends.db,version=3"
|
; ConnectionString = "URI=file:friends.db,version=3"
|
||||||
|
|
||||||
[Friends]
|
[Friends]
|
||||||
Connector = "OpenSim.Services.FriendsService.dll"
|
Connector = "OpenSim.Services.FriendsService.dll"
|
||||||
|
|
Loading…
Reference in New Issue