Changed the way RemoveObject is handled: now Scene.DeleteSceneObject() calls RegionSyncModule to
send RemovedObject message to other actors for synchronization.dsg
parent
c1e19ead74
commit
0be2fe7f13
|
@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
|
|
||||||
//Register for local Scene events
|
//Register for local Scene events
|
||||||
m_scene.EventManager.OnPostSceneCreation += OnPostSceneCreation;
|
m_scene.EventManager.OnPostSceneCreation += OnPostSceneCreation;
|
||||||
m_scene.EventManager.OnObjectBeingRemovedFromScene += new EventManager.ObjectBeingRemovedFromScene(RegionSyncModule_OnObjectBeingRemovedFromScene);
|
//m_scene.EventManager.OnObjectBeingRemovedFromScene += new EventManager.ObjectBeingRemovedFromScene(RegionSyncModule_OnObjectBeingRemovedFromScene);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1273,7 +1273,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
/// only be triggered by an object removal that is initiated locally.
|
/// only be triggered by an object removal that is initiated locally.
|
||||||
/// </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)
|
||||||
{
|
{
|
||||||
//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);
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
//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);
|
||||||
|
|
|
@ -662,8 +662,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (UnlinkSceneObject(group, false))
|
if (UnlinkSceneObject(group, false))
|
||||||
{
|
{
|
||||||
//For object removals caused by remote events (by other actors), do not trigger local event ObjectBeingRemovedFromScene
|
EventManager.TriggerObjectBeingRemovedFromScene(group);
|
||||||
//EventManager.TriggerObjectBeingRemovedFromScene(group);
|
|
||||||
EventManager.TriggerParcelPrimCountTainted();
|
EventManager.TriggerParcelPrimCountTainted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2430,8 +2429,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
part.SyncInfoUpdate();
|
part.SyncInfoUpdate();
|
||||||
}
|
}
|
||||||
//end of SYMMETRIC SYNC
|
*
|
||||||
* */
|
* */
|
||||||
|
|
||||||
|
//Propagate the RemovedObject message
|
||||||
|
if (RegionSyncModule != null)
|
||||||
|
{
|
||||||
|
RegionSyncModule.SendDeleteObject(group);
|
||||||
|
}
|
||||||
|
//end of SYMMETRIC SYNC
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3592,9 +3599,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); });
|
ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); });
|
||||||
|
|
||||||
|
//SYMMETRIC SYNC: object remove should be handled through RegionSyncModule
|
||||||
// REGION SYNC
|
// REGION SYNC
|
||||||
|
/*
|
||||||
if( IsSyncedServer() )
|
if( IsSyncedServer() )
|
||||||
RegionSyncServerModule.DeleteObject(m_regionHandle, localID, part);
|
RegionSyncServerModule.DeleteObject(m_regionHandle, localID, part);
|
||||||
|
* */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -1163,7 +1163,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Scene.RegionSyncServerModule.DeleteObject(part.RegionHandle, part.LocalId, part);
|
Scene.RegionSyncServerModule.DeleteObject(part.RegionHandle, part.LocalId, part);
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
* */
|
* */
|
||||||
|
//end of SYMMETRIC SYNC
|
||||||
|
|
||||||
Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue