Added softDelete parameter to SendDeleteObject in object synch.
parent
b3179d34da
commit
d874e4338f
|
@ -1013,7 +1013,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
{
|
{
|
||||||
// Get the data from message and error check
|
// Get the data from message and error check
|
||||||
OSDMap data = DeserializeMessage(msg);
|
OSDMap data = DeserializeMessage(msg);
|
||||||
string init_actorID = data["actorID"].AsString();
|
|
||||||
|
|
||||||
if (data == null)
|
if (data == null)
|
||||||
{
|
{
|
||||||
|
@ -1023,11 +1022,20 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID sogUUID = data["UUID"].AsUUID();
|
UUID sogUUID = data["UUID"].AsUUID();
|
||||||
|
string init_actorID = data["actorID"].AsString();
|
||||||
|
bool softDelete = data["softDelete"].AsBoolean();
|
||||||
|
|
||||||
SceneObjectGroup sog = m_scene.SceneGraph.GetGroupByPrim(sogUUID);
|
SceneObjectGroup sog = m_scene.SceneGraph.GetGroupByPrim(sogUUID);
|
||||||
if (sog != null)
|
if (sog != null)
|
||||||
{
|
{
|
||||||
m_scene.DeleteSceneObjectBySynchronization(sog);
|
if (!softDelete)
|
||||||
|
{
|
||||||
|
m_scene.DeleteSceneObjectBySynchronization(sog);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_scene.UnlinkSceneObject(sog, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if this is a relay node, forwards the event
|
//if this is a relay node, forwards the event
|
||||||
|
@ -1331,7 +1339,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sog"></param>
|
/// <param name="sog"></param>
|
||||||
//private void RegionSyncModule_OnObjectBeingRemovedFromScene(SceneObjectGroup sog)
|
//private void RegionSyncModule_OnObjectBeingRemovedFromScene(SceneObjectGroup sog)
|
||||||
public void SendDeleteObject(SceneObjectGroup sog)
|
public void SendDeleteObject(SceneObjectGroup sog, bool softDelete)
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("RegionSyncModule_OnObjectBeingRemovedFromScene called at time {0}:{1}:{2}", DateTime.Now.Minute, DateTime.Now.Second, DateTime.Now.Millisecond);
|
//m_log.DebugFormat("RegionSyncModule_OnObjectBeingRemovedFromScene called at time {0}:{1}:{2}", DateTime.Now.Minute, DateTime.Now.Second, DateTime.Now.Millisecond);
|
||||||
|
|
||||||
|
@ -1344,6 +1352,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
//data["localID"] = OSD.FromUInteger(sog.LocalId);
|
//data["localID"] = OSD.FromUInteger(sog.LocalId);
|
||||||
data["UUID"] = OSD.FromUUID(sog.UUID);
|
data["UUID"] = OSD.FromUUID(sog.UUID);
|
||||||
data["actorID"] = OSD.FromString(m_actorID);
|
data["actorID"] = OSD.FromString(m_actorID);
|
||||||
|
data["softDelete"] = OSD.FromBoolean(softDelete);
|
||||||
|
|
||||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.RemovedObject, OSDParser.SerializeJsonString(data));
|
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.RemovedObject, OSDParser.SerializeJsonString(data));
|
||||||
SendObjectUpdateToRelevantSyncConnectors(sog, rsm);
|
SendObjectUpdateToRelevantSyncConnectors(sog, rsm);
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
//void SendUpdatesToSynchronizeState(List<SceneObjectGroup> sog);
|
//void SendUpdatesToSynchronizeState(List<SceneObjectGroup> sog);
|
||||||
void SendSceneUpdates();
|
void SendSceneUpdates();
|
||||||
void SendTerrainUpdates(string lastUpdateActorID);
|
void SendTerrainUpdates(string lastUpdateActorID);
|
||||||
void SendDeleteObject(SceneObjectGroup sog);
|
void SendDeleteObject(SceneObjectGroup sog, bool softDelete);
|
||||||
|
|
||||||
//For propogating scene events to other actors
|
//For propogating scene events to other actors
|
||||||
void PublishSceneEvent(EventManager.EventNames ev, Object[] evArgs);
|
void PublishSceneEvent(EventManager.EventNames ev, Object[] evArgs);
|
||||||
|
|
|
@ -2475,7 +2475,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//Propagate the RemovedObject message
|
//Propagate the RemovedObject message
|
||||||
if (RegionSyncModule != null)
|
if (RegionSyncModule != null)
|
||||||
{
|
{
|
||||||
RegionSyncModule.SendDeleteObject(group);
|
RegionSyncModule.SendDeleteObject(group, false);
|
||||||
}
|
}
|
||||||
//end of SYMMETRIC SYNC
|
//end of SYMMETRIC SYNC
|
||||||
|
|
||||||
|
|
|
@ -2041,9 +2041,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// objectGroup.RootPart.SendScheduledUpdates();
|
// objectGroup.RootPart.SendScheduledUpdates();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}",
|
// "[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);
|
// objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID);
|
||||||
|
|
||||||
SceneObjectPart linkPart = objectGroup.m_rootPart;
|
SceneObjectPart linkPart = objectGroup.m_rootPart;
|
||||||
|
|
||||||
|
@ -2114,7 +2114,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
objectGroup.m_parts.Clear();
|
objectGroup.m_parts.Clear();
|
||||||
|
|
||||||
// Can't do this yet since backup still makes use of the root part without any synchronization
|
// Can't do this yet since backup still makes use of the root part without any synchronization
|
||||||
// objectGroup.m_rootPart = null;
|
// objectGroup.m_rootPart = null;
|
||||||
|
|
||||||
AttachToBackup();
|
AttachToBackup();
|
||||||
|
|
||||||
|
@ -2125,6 +2125,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
//HasGroupChanged = true;
|
//HasGroupChanged = true;
|
||||||
//ScheduleGroupForFullUpdate();
|
//ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
|
//SYMMETRIC SYNC
|
||||||
|
if (m_scene.RegionSyncModule != null)
|
||||||
|
m_scene.RegionSyncModule.SendDeleteObject(objectGroup, true);
|
||||||
|
//end of SYMMETRIC SYNC
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue