Code good for script engine and Scene to sync on majority object operations:

e.g. script execution, editing objects, reloading
oar file on Scene (but terrian not updated correctly to the debugging viewer of script engine),
rezing objects by scripts, deleting objects.
dsg
Huaiyu (Kitty) Liu 2010-12-28 17:11:30 -08:00
parent 821f80bf3f
commit 994d70f9d8
2 changed files with 12 additions and 1 deletions

View File

@ -455,7 +455,10 @@ namespace OpenSim.Region.Framework.Scenes
protected internal void AddToUpdateList(SceneObjectGroup obj) protected internal void AddToUpdateList(SceneObjectGroup obj)
{ {
lock (m_updateList) lock (m_updateList)
{
m_updateList[obj.UUID] = obj; m_updateList[obj.UUID] = obj;
m_log.Debug("added " + obj.UUID + " to m_updateList");
}
} }
/// <summary> /// <summary>
@ -474,6 +477,13 @@ namespace OpenSim.Region.Framework.Scenes
lock (m_updateList) lock (m_updateList)
{ {
updates = new List<SceneObjectGroup>(m_updateList.Values); updates = new List<SceneObjectGroup>(m_updateList.Values);
if (updates.Count > 0)
{
m_log.Debug("SceneGraph: " + updates.Count + " objects to send updates for");
}
m_updateList.Clear(); m_updateList.Clear();
} }
@ -1950,6 +1960,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
else else
{ {
m_log.Debug("AddSceneObjectByStateSynch to be called");
AddSceneObjectByStateSynch(updatedSog); AddSceneObjectByStateSynch(updatedSog);
return Scene.ObjectUpdateResult.New; return Scene.ObjectUpdateResult.New;
} }

View File

@ -5087,7 +5087,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
public void ScheduleFullUpdate_SyncInfoUnchanged() public void ScheduleFullUpdate_SyncInfoUnchanged()
{ {
// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); m_log.DebugFormat("[SCENE OBJECT PART]: ScheduleFullUpdate_SyncInfoUnchanged for {0} {1}", Name, LocalId);
if (m_parentGroup != null) if (m_parentGroup != null)
{ {