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
|
||||
OSDMap data = DeserializeMessage(msg);
|
||||
string init_actorID = data["actorID"].AsString();
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
|
@ -1023,11 +1022,20 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
|
||||
UUID sogUUID = data["UUID"].AsUUID();
|
||||
string init_actorID = data["actorID"].AsString();
|
||||
bool softDelete = data["softDelete"].AsBoolean();
|
||||
|
||||
SceneObjectGroup sog = m_scene.SceneGraph.GetGroupByPrim(sogUUID);
|
||||
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
|
||||
|
@ -1331,7 +1339,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
/// </summary>
|
||||
/// <param name="sog"></param>
|
||||
//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);
|
||||
|
||||
|
@ -1344,6 +1352,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//data["localID"] = OSD.FromUInteger(sog.LocalId);
|
||||
data["UUID"] = OSD.FromUUID(sog.UUID);
|
||||
data["actorID"] = OSD.FromString(m_actorID);
|
||||
data["softDelete"] = OSD.FromBoolean(softDelete);
|
||||
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.RemovedObject, OSDParser.SerializeJsonString(data));
|
||||
SendObjectUpdateToRelevantSyncConnectors(sog, rsm);
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
//void SendUpdatesToSynchronizeState(List<SceneObjectGroup> sog);
|
||||
void SendSceneUpdates();
|
||||
void SendTerrainUpdates(string lastUpdateActorID);
|
||||
void SendDeleteObject(SceneObjectGroup sog);
|
||||
void SendDeleteObject(SceneObjectGroup sog, bool softDelete);
|
||||
|
||||
//For propogating scene events to other actors
|
||||
void PublishSceneEvent(EventManager.EventNames ev, Object[] evArgs);
|
||||
|
|
|
@ -2475,7 +2475,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//Propagate the RemovedObject message
|
||||
if (RegionSyncModule != null)
|
||||
{
|
||||
RegionSyncModule.SendDeleteObject(group);
|
||||
RegionSyncModule.SendDeleteObject(group, false);
|
||||
}
|
||||
//end of SYMMETRIC SYNC
|
||||
|
||||
|
|
|
@ -2041,9 +2041,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;
|
||||
|
||||
|
@ -2112,9 +2112,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
objectGroup.m_isDeleted = true;
|
||||
|
||||
objectGroup.m_parts.Clear();
|
||||
|
||||
|
||||
// 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();
|
||||
|
||||
|
@ -2125,6 +2125,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
//HasGroupChanged = true;
|
||||
//ScheduleGroupForFullUpdate();
|
||||
|
||||
//SYMMETRIC SYNC
|
||||
if (m_scene.RegionSyncModule != null)
|
||||
m_scene.RegionSyncModule.SendDeleteObject(objectGroup, true);
|
||||
//end of SYMMETRIC SYNC
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue