From e6453d9b9d347ee366590c05053f38abb4852b43 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 11 Feb 2008 05:19:54 +0000 Subject: * Changed child_get_tasks to see_into_this_sim_from_neighbor. * Turned on see_into_this_sim_from_neighbor by default. * Fix Race Condition with parts being added to a group while the simulator is starting up. --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 8 ++++---- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 15 +++++++++------ OpenSim/Region/Environment/Scenes/ScenePresence.cs | 6 +++--- 4 files changed, 17 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index cb04939..219db63 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -716,7 +716,7 @@ namespace OpenSim.Region.Environment.Scenes // the initial update for and what we'll use to limit the // space we check for new objects on movement. - if (presence.IsChildAgent && m_parentScene.m_sendTasksToChild) + if (presence.IsChildAgent && m_parentScene.m_seeIntoRegionFromNeighbor) { LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 999de9c..88cda40 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.Environment.Scenes private readonly Mutex updateLock; public bool m_physicalPrim; - public bool m_sendTasksToChild; + public bool m_seeIntoRegionFromNeighbor; private int m_RestartTimerCounter; private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing private int m_incrementsof15seconds = 0; @@ -224,7 +224,7 @@ namespace OpenSim.Region.Environment.Scenes public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, - ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SendTasksToChild) + ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SeeIntoRegionFromNeighbor) { updateLock = new Mutex(false); @@ -241,7 +241,7 @@ namespace OpenSim.Region.Environment.Scenes m_datastore = m_regInfo.DataStore; m_physicalPrim = physicalPrim; - m_sendTasksToChild = SendTasksToChild; + m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor; m_eventManager = new EventManager(); @@ -317,7 +317,7 @@ namespace OpenSim.Region.Environment.Scenes OSString = OSString.Substring(0, 45); } - m_simulatorVersion = "OpenSimulator v0.5-SVN on " + OSString + " ChilTasks:" + m_sendTasksToChild.ToString() + " PhysPrim:" + m_physicalPrim.ToString(); + m_simulatorVersion = "OpenSimulator v0.5-SVN on " + OSString + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() + " PhysPrim:" + m_physicalPrim.ToString(); } #endregion diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 05b9014..83f0c27 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1726,13 +1726,16 @@ namespace OpenSim.Region.Environment.Scenes { if (m_parts.Count > 1) { - foreach (SceneObjectPart part in m_parts.Values) + lock (m_parts) { - part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); - - // Hack to get the physics scene geometries in the right spot - ResetChildPrimPhysicsPositions(); - + foreach (SceneObjectPart part in m_parts.Values) + { + part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); + + // Hack to get the physics scene geometries in the right spot + ResetChildPrimPhysicsPositions(); + + } } } else diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 21710c0..8155b10 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -428,7 +428,7 @@ namespace OpenSim.Region.Environment.Scenes if (!m_gotAllObjectsInScene) { - if (!m_isChildAgent || m_scene.m_sendTasksToChild) + if (!m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) { m_scene.SendAllSceneObjectsToClient(this); @@ -1358,7 +1358,7 @@ namespace OpenSim.Region.Environment.Scenes SendFullUpdateToOtherClient(avatar); if (avatar.LocalId != LocalId) { - if (!avatar.m_isChildAgent || m_scene.m_sendTasksToChild) + if (!avatar.m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) { avatar.SendFullUpdateToOtherClient(this); avatar.SendAppearanceToOtherAgent(this); @@ -1638,7 +1638,7 @@ namespace OpenSim.Region.Environment.Scenes // Sends out the objects in the user's draw distance if m_sendTasksToChild is true. - if (m_scene.m_sendTasksToChild) + if (m_scene.m_seeIntoRegionFromNeighbor) m_scene.SendAllSceneObjectsToClient(this); //cAgentData.AVHeight; //cAgentData.regionHandle; -- cgit v1.1