Removed calling of AddOrUpdateObjectBySynchronization from Scene and SceneGraph.
Removed Bucket Sync related code from SceneObjectGroup.dsg
parent
4fc36b0748
commit
6c945ae38f
|
@ -1941,42 +1941,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleAddOrUpdateObjectBySynchronization(SymmetricSyncMessage msg, string senderActorID)
|
|
||||||
{
|
|
||||||
string sogxml = Encoding.ASCII.GetString(msg.Data, 0, msg.Length);
|
|
||||||
SceneObjectGroup sog = SceneObjectSerializer.FromXml2Format(sogxml);
|
|
||||||
lock (m_stats) m_statSOGBucketIn++;
|
|
||||||
|
|
||||||
|
|
||||||
if (sog.IsDeleted)
|
|
||||||
{
|
|
||||||
SymmetricSyncMessage.HandleTrivial(LogHeader, msg, String.Format("Ignoring update on deleted object, UUID: {0}.", sog.UUID));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
Scene.ObjectUpdateResult updateResult = m_scene.AddOrUpdateObjectBySynchronization(sog);
|
|
||||||
|
|
||||||
//if (added)
|
|
||||||
switch (updateResult)
|
|
||||||
{
|
|
||||||
case Scene.ObjectUpdateResult.New:
|
|
||||||
m_log.DebugFormat("[{0} Object \"{1}\" ({1}) ({2}) added.", LogHeader, sog.Name, sog.UUID.ToString(), sog.LocalId.ToString());
|
|
||||||
break;
|
|
||||||
case Scene.ObjectUpdateResult.Updated:
|
|
||||||
m_log.DebugFormat("[{0} Object \"{1}\" ({1}) ({2}) updated.", LogHeader, sog.Name, sog.UUID.ToString(), sog.LocalId.ToString());
|
|
||||||
break;
|
|
||||||
case Scene.ObjectUpdateResult.Error:
|
|
||||||
m_log.WarnFormat("[{0} Object \"{1}\" ({1}) ({2}) -- add or update ERROR.", LogHeader, sog.Name, sog.UUID.ToString(), sog.LocalId.ToString());
|
|
||||||
break;
|
|
||||||
case Scene.ObjectUpdateResult.Unchanged:
|
|
||||||
//m_log.DebugFormat("[{0} Object \"{1}\" ({1}) ({2}) unchanged after receiving an update.", LogHeader, sog.Name, sog.UUID.ToString(), sog.LocalId.ToString());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send out a sync message about the updated Terrain. If this is a relay node,
|
/// Send out a sync message about the updated Terrain. If this is a relay node,
|
||||||
/// forward the sync message to all connectors except the one which initiated
|
/// forward the sync message to all connectors except the one which initiated
|
||||||
|
@ -2152,27 +2116,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
UUID primUUID = data["primUUID"].AsUUID();
|
UUID primUUID = data["primUUID"].AsUUID();
|
||||||
UUID itemID = data["itemID"].AsUUID();
|
UUID itemID = data["itemID"].AsUUID();
|
||||||
|
|
||||||
/*
|
|
||||||
string sogXml = data["sog"].AsString();
|
|
||||||
SceneObjectGroup sog = SceneObjectSerializer.FromXml2Format(sogXml);
|
|
||||||
SceneObjectPart part = null;
|
|
||||||
|
|
||||||
foreach (SceneObjectPart prim in sog.Parts)
|
|
||||||
{
|
|
||||||
if(prim.UUID.Equals(primID)){
|
|
||||||
part = prim;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(part == null)
|
|
||||||
{
|
|
||||||
m_log.Warn(LogHeader+": part "+primID+" not exist in the serialized object, do nothing");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//Update the object first
|
|
||||||
Scene.ObjectUpdateResult updateResult = m_scene.AddOrUpdateObjectBySynchronization(sog);
|
|
||||||
* */
|
|
||||||
|
|
||||||
SceneObjectPart localPart = m_scene.GetSceneObjectPart(primUUID);
|
SceneObjectPart localPart = m_scene.GetSceneObjectPart(primUUID);
|
||||||
|
|
||||||
if (localPart == null || localPart.ParentGroup.IsDeleted)
|
if (localPart == null || localPart.ParentGroup.IsDeleted)
|
||||||
|
@ -2445,16 +2388,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
//sog = new SceneObjectGroup(part);
|
//sog = new SceneObjectGroup(part);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
//For simplicity, we just leverage a SOP's serialization method to transmit the information of new inventory item for the script).
|
|
||||||
//This can certainly be optimized later (e.g. only sending serialization of the inventory item)
|
|
||||||
OSDMap data = new OSDMap();
|
|
||||||
data["agentID"] = OSD.FromUUID(clientID);
|
|
||||||
data["primID"] = OSD.FromUUID(part.UUID);
|
|
||||||
data["itemID"] = OSD.FromUUID(itemID); //id of the new inventory item of the part
|
|
||||||
data["sog"] = OSD.FromString(SceneObjectSerializer.ToXml2Format(sog));
|
|
||||||
* */
|
|
||||||
|
|
||||||
HashSet<SceneObjectPartSyncProperties> updatedProperties = m_primSyncInfoManager.UpdatePrimSyncInfoByLocal(part,
|
HashSet<SceneObjectPartSyncProperties> updatedProperties = m_primSyncInfoManager.UpdatePrimSyncInfoByLocal(part,
|
||||||
new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.TaskInventory});
|
new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.TaskInventory});
|
||||||
|
|
||||||
|
|
|
@ -663,14 +663,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//This function should only be called by an actor who's local Scene is just a cache of the authorative Scene.
|
|
||||||
//If the object already exists, use the new copy to replace it.
|
|
||||||
//Return true if added, false if just updated
|
|
||||||
public ObjectUpdateResult AddOrUpdateObjectBySynchronization(SceneObjectGroup sog)
|
|
||||||
{
|
|
||||||
return m_sceneGraph.AddOrUpdateObjectBySynchronization(sog);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ObjectUpdateResult UpdateObjectBySynchronization(SceneObjectGroup sog)
|
public ObjectUpdateResult UpdateObjectBySynchronization(SceneObjectGroup sog)
|
||||||
{
|
{
|
||||||
return m_sceneGraph.UpdateObjectBySynchronization(sog);
|
return m_sceneGraph.UpdateObjectBySynchronization(sog);
|
||||||
|
|
|
@ -2033,42 +2033,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return updateResult;
|
return updateResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Scene.ObjectUpdateResult AddOrUpdateObjectBySynchronization(SceneObjectGroup updatedSog)
|
|
||||||
{
|
|
||||||
UUID sogID = updatedSog.UUID;
|
|
||||||
Scene.ObjectUpdateResult updateResult = Scene.ObjectUpdateResult.Unchanged;
|
|
||||||
|
|
||||||
if (Entities.ContainsKey(sogID))
|
|
||||||
{
|
|
||||||
//update the object
|
|
||||||
EntityBase entity = Entities[sogID];
|
|
||||||
if (entity is SceneObjectGroup)
|
|
||||||
{
|
|
||||||
SceneObjectGroup localSog = (SceneObjectGroup)entity;
|
|
||||||
updateResult = localSog.UpdateObjectGroupBySync(updatedSog);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.WarnFormat("{0}: Entity with {1} iss not of type SceneObjectGroup: {2}",
|
|
||||||
"[SCENE GRAPH]", sogID, entity.GetType().ToString());
|
|
||||||
//return false;
|
|
||||||
updateResult = Scene.ObjectUpdateResult.Error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//m_log.Debug(updatedSog.Name+" "+updatedSog.UUID+" not found in Entities list. Need to add");
|
|
||||||
AddNewSceneObjectBySync(updatedSog);
|
|
||||||
updateResult = Scene.ObjectUpdateResult.New;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Debug
|
|
||||||
//m_log.Debug("after AddOrUpdateObjectBySynchronization");
|
|
||||||
//m_parentScene.DebugSceneObjectGroups();
|
|
||||||
|
|
||||||
return updateResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
//This is called when an object is added due to receiving a state synchronization message from Scene or an actor. Do similar things as the original AddSceneObject(),
|
//This is called when an object is added due to receiving a state synchronization message from Scene or an actor. Do similar things as the original AddSceneObject(),
|
||||||
//but call ScheduleGroupForFullUpdate_TimeStampUnchanged() instead, so as not to modify the timestamp or actorID, since the object was not created locally.
|
//but call ScheduleGroupForFullUpdate_TimeStampUnchanged() instead, so as not to modify the timestamp or actorID, since the object was not created locally.
|
||||||
public Scene.ObjectUpdateResult AddNewSceneObjectBySync(SceneObjectGroup sceneObject)
|
public Scene.ObjectUpdateResult AddNewSceneObjectBySync(SceneObjectGroup sceneObject)
|
||||||
|
|
|
@ -599,17 +599,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
// 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.
|
// for the same object with very different properties. The caller must schedule the update.
|
||||||
//ScheduleGroupForFullUpdate();
|
//ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
//DSG SYNC
|
|
||||||
/*
|
|
||||||
if (m_scene.RegionSyncModule != null)
|
|
||||||
{
|
|
||||||
foreach (SceneObjectPart part in Parts)
|
|
||||||
{
|
|
||||||
part.InitializeBucketSyncInfo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
* */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GroupScale()
|
public Vector3 GroupScale()
|
||||||
|
@ -3999,37 +3988,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
|
||||||
// Bucket based sync
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public void BucketSyncInfoUpdate()
|
|
||||||
{
|
|
||||||
long timeStamp = DateTime.Now.Ticks;
|
|
||||||
string actorID = m_scene.GetSyncActorID();
|
|
||||||
foreach (SceneObjectPart part in Parts)
|
|
||||||
{
|
|
||||||
//part.SyncInfoUpdate(timeStamp, actorID);
|
|
||||||
part.UpdateAllBucketSyncInfo(timeStamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateTaintedBucketSyncInfo(long timeStamp)
|
|
||||||
{
|
|
||||||
foreach (SceneObjectPart part in Parts)
|
|
||||||
{
|
|
||||||
part.UpdateTaintedBucketSyncInfo(timeStamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateTaintedBucketSyncInfo(string bucketName, long timeStamp)
|
|
||||||
{
|
|
||||||
foreach (SceneObjectPart part in Parts)
|
|
||||||
{
|
|
||||||
part.UpdateTaintedBucketSyncInfo(bucketName, timeStamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
// Per SOP property based sync
|
// Per SOP property based sync
|
||||||
|
|
Loading…
Reference in New Issue