Fixed more bugs while merging in the functions from commit 5b79e15285
.
parent
8df517454d
commit
2abffd867f
|
@ -458,8 +458,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
data["softDelete"] = OSD.FromBoolean(softDelete);
|
||||
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.RemovedObject, OSDParser.SerializeJsonString(data));
|
||||
//SendObjectUpdateToRelevantSyncConnectors(sog, rsm);
|
||||
SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, sog);
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(m_actorID, sog, rsm);
|
||||
//SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, sog);
|
||||
}
|
||||
|
||||
|
||||
|
@ -483,17 +483,18 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
data["partCount"] = OSD.FromInteger(children.Count);
|
||||
data["actorID"] = OSD.FromString(m_actorID);
|
||||
int partNum = 0;
|
||||
foreach(SceneObjectPart part in children){
|
||||
foreach (SceneObjectPart part in children)
|
||||
{
|
||||
string partTempID = "part" + partNum;
|
||||
data[partTempID] = OSD.FromUUID(part.UUID);
|
||||
partNum++;
|
||||
|
||||
m_log.DebugFormat("{0}: SendLinkObject to link {1},{2} with {3}, {4}", part.Name, part.UUID, root.Name, root.UUID);
|
||||
//m_log.DebugFormat("{0}: SendLinkObject to link {1},{2} with {3}, {4}", part.Name, part.UUID, root.Name, root.UUID);
|
||||
}
|
||||
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.LinkObject, OSDParser.SerializeJsonString(data));
|
||||
//SendObjectUpdateToRelevantSyncConnectors(linkedGroup, rsm);
|
||||
SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, linkedGroup);
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(m_actorID, linkedGroup, rsm);
|
||||
//SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, linkedGroup);
|
||||
}
|
||||
|
||||
public void SendDeLinkObject(List<SceneObjectPart> prims, List<SceneObjectGroup> beforeDelinkGroups, List<SceneObjectGroup> afterDelinkGroups)
|
||||
|
@ -924,7 +925,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//string sogxml = SceneObjectSerializer.ToXml2Format(sog);
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.NewObject, OSDParser.SerializeJsonString(data));
|
||||
|
||||
m_log.DebugFormat("{0}: Created a NewObject message for {1},{2}, at pos {3}", LogHeader, sog.Name, sog.UUID, globalPos);
|
||||
//SYNC DEBUG
|
||||
//m_log.DebugFormat("{0}: Created a NewObject message for {1},{2}, at pos {3}", LogHeader, sog.Name, sog.UUID, globalPos);
|
||||
|
||||
return rsm;
|
||||
}
|
||||
|
@ -948,7 +950,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
sog.AbsolutePosition = localPos;
|
||||
|
||||
//TEMP DEBUG
|
||||
m_log.DebugFormat("{0}: received NewObject sync message for object {1}, {2} at pos {3}", LogHeader, sog.Name, sog.UUID, sog.AbsolutePosition.ToString());
|
||||
//m_log.DebugFormat("{0}: received NewObject sync message for object {1}, {2} at pos {3}", LogHeader, sog.Name, sog.UUID, sog.AbsolutePosition.ToString());
|
||||
|
||||
Scene.ObjectUpdateResult updateResult = m_scene.AddNewSceneObjectBySync(sog);
|
||||
|
||||
|
@ -1000,7 +1002,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
|
||||
lock (m_stats) m_statSOGBucketOut++;
|
||||
|
||||
m_log.DebugFormat(LogHeader + " calling SendObjectUpdateToRelevantSyncConnectors for general bucket for sog {0},{1}", sog.Name, sog.UUID);
|
||||
//TEMP SYNC DEBUG
|
||||
//m_log.DebugFormat(LogHeader + " calling SendObjectUpdateToRelevantSyncConnectors for general bucket for sog {0},{1}", sog.Name, sog.UUID);
|
||||
|
||||
SendObjectUpdateToRelevantSyncConnectors(sog, syncMsg);
|
||||
|
||||
|
@ -1034,7 +1037,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
* */
|
||||
|
||||
m_log.DebugFormat("{0}: PrimUpdatesGeneralBucketReceiver called, for update at GroupPosition {1}", LogHeader, groupPosition.ToString());
|
||||
//TEMP SYNC DEBUG
|
||||
//m_log.DebugFormat("{0}: PrimUpdatesGeneralBucketReceiver called, for update at GroupPosition {1}", LogHeader, groupPosition.ToString());
|
||||
|
||||
Object ret;
|
||||
GeneralBucketPropertiesDecoder(bucketName, data, out ret);
|
||||
|
@ -1057,11 +1061,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
m_log.DebugFormat("{0}: UpdateObjectBySynchronization to be called for: sog {1}, {2}, at post {3}", LogHeader, sog.Name, sog.UUID, sog.AbsolutePosition);
|
||||
//TEMP SYNC DEBUG
|
||||
//m_log.DebugFormat("{0}: UpdateObjectBySynchronization to be called for: sog {1}, {2}, at post {3}", LogHeader, sog.Name, sog.UUID, sog.AbsolutePosition);
|
||||
|
||||
Scene.ObjectUpdateResult updateResult = m_scene.UpdateObjectBySynchronization(sog);
|
||||
|
||||
/*
|
||||
switch (updateResult)
|
||||
{
|
||||
case Scene.ObjectUpdateResult.New:
|
||||
|
@ -1077,9 +1082,11 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//m_log.DebugFormat("[{0} Object \"{1}\" ({1}) ({2}) unchanged after receiving an update.", LogHeader, sog.Name, sog.UUID.ToString(), sog.LocalId.ToString());
|
||||
break;
|
||||
}
|
||||
* */
|
||||
|
||||
m_log.DebugFormat("{0}: end of processing UpdatedObject {4} bucket, for object {1}, {2}, at pos {3}", LogHeader, sog.Name,
|
||||
sog.UUID, sog.AbsolutePosition, bucketName);
|
||||
//TEMP SYNC DEBUG
|
||||
// m_log.DebugFormat("{0}: end of processing UpdatedObject {4} bucket, for object {1}, {2}, at pos {3}", LogHeader, sog.Name,
|
||||
// sog.UUID, sog.AbsolutePosition, bucketName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1121,7 +1128,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
data["GroupPosition"] = OSDMap.FromVector3(globalPos);
|
||||
|
||||
//TEMP DEBUG
|
||||
m_log.Debug(LogHeader + " GeneralBucketPropertiesEncoder for " + sog.Name + "," + sog.UUID + ". GlobalPos: " + globalPos.ToString());
|
||||
//m_log.Debug(LogHeader + " GeneralBucketPropertiesEncoder for " + sog.Name + "," + sog.UUID + ". GlobalPos: " + globalPos.ToString());
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -1196,7 +1203,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
* */
|
||||
|
||||
m_log.DebugFormat("{0}: PrimUpdatesPhysicsBucketReceiver called, for update at GroupPosition {1}", LogHeader, groupPosition.ToString());
|
||||
//TEMP SYNC DEBUG
|
||||
//m_log.DebugFormat("{0}: PrimUpdatesPhysicsBucketReceiver called, for update at GroupPosition {1}", LogHeader, groupPosition.ToString());
|
||||
|
||||
Object ret;
|
||||
PhysicsBucketPropertiesDecoder(bucketName, data, out ret);
|
||||
|
@ -1221,10 +1229,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
|
||||
m_scene.UpdateObjectPartBucketProperties(bucketName, partUUID, data, rBucketSyncInfo);
|
||||
|
||||
//TEMP DEBUG
|
||||
//TEMP SYNC DEBUG
|
||||
SceneObjectPart localPart = m_scene.GetSceneObjectPart(partUUID);
|
||||
m_log.DebugFormat("{0}: end of processing UpdatedObject {4} bucket, for part {1}, {2}, at group pos {3}", LogHeader, localPart.Name,
|
||||
localPart.UUID, localPart.GroupPosition, bucketName);
|
||||
//m_log.DebugFormat("{0}: end of processing UpdatedObject {4} bucket, for part {1}, {2}, at group pos {3}", LogHeader, localPart.Name,
|
||||
// localPart.UUID, localPart.GroupPosition, bucketName);
|
||||
}
|
||||
|
||||
private OSDMap PhysicsBucketPropertiesEncoder(string bucketName, Object part)
|
||||
|
@ -1454,23 +1462,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
}
|
||||
|
||||
//Object updates are sent by enqueuing into each connector's outQueue.
|
||||
private void SendObjectUpdateToRelevantSyncConnectors(SceneObjectPart updatedPart, SymmetricSyncMessage syncMsg)
|
||||
{
|
||||
HashSet<SyncConnector> syncConnectors = GetSyncConnectorsForObjectUpdates(updatedPart);
|
||||
|
||||
foreach (SyncConnector connector in syncConnectors)
|
||||
{
|
||||
//string sogxml = SceneObjectSerializer.ToXml2Format(sog);
|
||||
//SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedObject, sogxml);
|
||||
|
||||
//m_log.Debug("Send " + syncMsg.Type.ToString() + " about sop " + updatedPart.Name + "," + updatedPart.UUID + " at pos "+updatedPart.GroupPosition.ToString()
|
||||
//+" to " + connector.OtherSideActorID);
|
||||
|
||||
connector.EnqueueOutgoingUpdate(updatedPart.UUID, syncMsg.ToBytes());
|
||||
}
|
||||
}
|
||||
|
||||
//Object updates are sent by enqueuing into each connector's outQueue.
|
||||
private void SendPrimUpdateToRelevantSyncConnectors(SceneObjectPart updatedPart, SymmetricSyncMessage syncMsg, string lastUpdateActorID)
|
||||
{
|
||||
|
@ -2319,6 +2310,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
|
||||
Scene.ObjectUpdateResult updateResult = m_scene.UpdateObjectBySynchronization(sog);
|
||||
|
||||
/*
|
||||
switch (updateResult)
|
||||
{
|
||||
case Scene.ObjectUpdateResult.New:
|
||||
|
@ -2334,6 +2326,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//m_log.DebugFormat("[{0} Object \"{1}\" ({1}) ({2}) unchanged after receiving an update.", LogHeader, sog.Name, sog.UUID.ToString(), sog.LocalId.ToString());
|
||||
break;
|
||||
}
|
||||
* */
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2468,7 +2461,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//if this is a relay node, forwards the event
|
||||
if (m_isSyncRelay)
|
||||
{
|
||||
SendSceneEventToRelevantSyncConnectors(senderActorID, msg, sog);
|
||||
//SendSceneEventToRelevantSyncConnectors(senderActorID, msg, sog);
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(senderActorID, sog, msg);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2476,12 +2470,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
{
|
||||
if (!softDelete)
|
||||
{
|
||||
m_log.DebugFormat("{0}: hard delete object {1}", LogHeader, sog.UUID);
|
||||
//m_log.DebugFormat("{0}: hard delete object {1}", LogHeader, sog.UUID);
|
||||
m_scene.DeleteSceneObjectBySynchronization(sog);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("{0}: soft delete object {1}", LogHeader, sog.UUID);
|
||||
//m_log.DebugFormat("{0}: soft delete object {1}", LogHeader, sog.UUID);
|
||||
m_scene.UnlinkSceneObject(sog, true);
|
||||
}
|
||||
}
|
||||
|
@ -2502,7 +2496,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
|
||||
//string init_actorID = data["actorID"].AsString();
|
||||
string sogxml = data["linkedGroup"].AsString();
|
||||
SceneObjectGroup linkedGroup = SceneObjectSerializer.FromXml2Format(sogxml);
|
||||
//SceneObjectGroup linkedGroup = SceneObjectSerializer.FromXml2Format(sogxml);
|
||||
SceneObjectGroup linkedGroup = DecodeSceneObjectGroup(sogxml);
|
||||
|
||||
UUID rootID = data["rootID"].AsUUID();
|
||||
int partCount = data["partCount"].AsInteger();
|
||||
List<UUID> childrenIDs = new List<UUID>();
|
||||
|
@ -2511,7 +2507,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//if this is a relay node, forwards the event
|
||||
if (m_isSyncRelay)
|
||||
{
|
||||
SendSceneEventToRelevantSyncConnectors(senderActorID, msg, linkedGroup);
|
||||
//SendSceneEventToRelevantSyncConnectors(senderActorID, msg, linkedGroup);
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(senderActorID, linkedGroup, msg);
|
||||
}
|
||||
|
||||
for (int i = 0; i < partCount; i++)
|
||||
|
@ -2520,7 +2517,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
childrenIDs.Add(data[partTempID].AsUUID());
|
||||
}
|
||||
|
||||
m_log.DebugFormat("{0}: received LinkObject from {1}", LogHeader, senderActorID);
|
||||
//TEMP SYNC DEBUG
|
||||
//m_log.DebugFormat("{0}: received LinkObject from {1}", LogHeader, senderActorID);
|
||||
|
||||
m_scene.LinkObjectBySync(linkedGroup, rootID, childrenIDs);
|
||||
|
||||
|
@ -2529,11 +2527,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
|
||||
private void HandleDelinkObject(SymmetricSyncMessage msg, string senderActorID)
|
||||
{
|
||||
//if this is a relay node, forwards the event
|
||||
if (m_isSyncRelay)
|
||||
{
|
||||
SendSceneEventToRelevantSyncConnectors(senderActorID, msg, null);
|
||||
}
|
||||
|
||||
|
||||
OSDMap data = DeserializeMessage(msg);
|
||||
if (data == null)
|
||||
|
@ -2570,10 +2564,23 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
{
|
||||
string groupTempID = "afterGroup" + i;
|
||||
string sogxml = data[groupTempID].AsString();
|
||||
SceneObjectGroup afterGroup = SceneObjectSerializer.FromXml2Format(sogxml);
|
||||
//SceneObjectGroup afterGroup = SceneObjectSerializer.FromXml2Format(sogxml);
|
||||
SceneObjectGroup afterGroup = DecodeSceneObjectGroup(sogxml);
|
||||
incomingAfterDelinkGroups.Add(afterGroup);
|
||||
}
|
||||
|
||||
//if this is a relay node, forwards the event
|
||||
if (m_isSyncRelay)
|
||||
{
|
||||
List<SceneObjectGroup> beforeDelinkGroups = new List<SceneObjectGroup>();
|
||||
foreach (UUID sogID in beforeDelinkGroupIDs)
|
||||
{
|
||||
SceneObjectGroup sog = m_scene.SceneGraph.GetGroupByPrim(sogID);
|
||||
beforeDelinkGroups.Add(sog);
|
||||
}
|
||||
SendDelinkObjectToRelevantSyncConnectors(senderActorID, beforeDelinkGroups, msg);
|
||||
}
|
||||
|
||||
m_scene.DelinkObjectsBySync(delinkPrimIDs, beforeDelinkGroupIDs, incomingAfterDelinkGroups);
|
||||
|
||||
}
|
||||
|
|
|
@ -822,7 +822,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
partNames += "(" + child.Name + "," + child.UUID + ")";
|
||||
}
|
||||
m_log.Debug("LinkObjectBySync: " + part.Name + "," + part.UUID + " with root "+root.Name+","+root.UUID+"; its SOG has " + part.ParentGroup.Parts.Length + " parts : "+partNames);
|
||||
//m_log.Debug("LinkObjectBySync: " + part.Name + "," + part.UUID + " with root "+root.Name+","+root.UUID+"; its SOG has " + part.ParentGroup.Parts.Length + " parts : "+partNames);
|
||||
|
||||
children.Add(part);
|
||||
}
|
||||
|
|
|
@ -2115,9 +2115,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// objectGroup.RootPart.SendScheduledUpdates();
|
||||
//}
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}",
|
||||
objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID);
|
||||
//m_log.DebugFormat(
|
||||
// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}",
|
||||
// objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID);
|
||||
|
||||
SceneObjectPart linkPart = objectGroup.m_rootPart;
|
||||
|
||||
|
|
|
@ -5574,7 +5574,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
localPart.RotationOffset = updatedPart.RotationOffset;
|
||||
|
||||
//TEMP DEBUG
|
||||
m_log.DebugFormat("SceneObjectPart.PhysicsBucketUpdateProcessor called for part {0},{1}, at GroupPos {2}", localPart.Name, localPart.UUID, localPart.GroupPosition);
|
||||
// m_log.DebugFormat("SceneObjectPart.PhysicsBucketUpdateProcessor called for part {0},{1}, at GroupPos {2}", localPart.Name, localPart.UUID, localPart.GroupPosition);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -5650,7 +5650,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
//TEMP DEBUG
|
||||
m_log.DebugFormat("SceneObjectPart.PhysicsBucketUpdateProcessor called for part {0},{1}, at GroupPos {2}", localPart.Name, localPart.UUID, localPart.GroupPosition);
|
||||
//m_log.DebugFormat("SceneObjectPart.PhysicsBucketUpdateProcessor called for part {0},{1}, at GroupPos {2}", localPart.Name, localPart.UUID, localPart.GroupPosition);
|
||||
|
||||
//Schedule updates to be sent out, if the local copy has just been updated
|
||||
//(1) if we are debugging the actor with a viewer attaching to it,
|
||||
|
|
Loading…
Reference in New Issue