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/Application/OpenSimMain.cs | 13 ++++--------- 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 +++--- 5 files changed, 21 insertions(+), 23 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index d28d65a..3df4c8c 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -65,7 +65,7 @@ namespace OpenSim public bool m_sandbox; public bool user_accounts; public bool m_gridLocalAsset; - public bool m_SendChildAgentTaskData; + public bool m_see_into_region_from_neighbor; protected LocalLoginService m_loginService; @@ -167,7 +167,7 @@ namespace OpenSim config.Set("physics", "basicphysics"); config.Set("verbose", true); config.Set("physical_prim", true); - config.Set("child_get_tasks", false); + config.Set("see_into_this_sim_from_neighbor", true); config.Set("serverside_object_permissions", false); config.Set("storage_plugin", "OpenSim.Framework.Data.SQLite.dll"); config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); @@ -238,7 +238,7 @@ namespace OpenSim m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); - m_SendChildAgentTaskData = startupConfig.GetBoolean("child_get_tasks", false); + m_see_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); @@ -490,15 +490,10 @@ namespace OpenSim { PermissionManager permissionManager = new PermissionManager(); SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); - if (m_SendChildAgentTaskData) - { - m_log.Error("[WARNING]: Send Child Agent Task Updates is enabled. This is for testing only."); - //Thread.Sleep(12000); - } return new Scene(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, - m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_SendChildAgentTaskData); + m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor); } 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