From 7f996448647e2703b82ea750bd38196fe5cea838 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 18 Nov 2007 11:11:44 +0000 Subject: Attempt to get World Map working in Grid mode, will need to be using the grid asset server for it to work correctly and has only been quickly tested in a three region grid. Moved PermissionManager creation out of the Scene constructor and instead a PermissionManager is passed to the constructor as a param. So that we could create and use custom permissionsManagers. Added AllowMovement property to ScenePresence which can be used to stop movement of avatars (for example in a custom region that wanted avatars always in one place). Added PermissionManager call when copying objects, although currently the call will always return true so that it allows copying in places like Wright Plaza. A few other changes/fixes. --- OpenSim/Region/Environment/Scenes/Scene.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2c765a3..1400e60 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -195,7 +195,7 @@ namespace OpenSim.Region.Environment.Scenes #region Constructors - public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, + public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim) { @@ -217,15 +217,14 @@ namespace OpenSim.Region.Environment.Scenes m_LandManager = new LandManager(this, m_regInfo); m_estateManager = new EstateManager(this, m_regInfo); m_eventManager = new EventManager(); - m_permissionManager = new PermissionManager(this); + + m_permissionManager = permissionManager; + m_permissionManager.Initialise(this); m_innerScene = new InnerScene(this, m_regInfo, m_permissionManager); m_sceneXmlLoader = new SceneXmlLoader(this, m_innerScene, m_regInfo); - m_eventManager.OnParcelPrimCountAdd += - m_LandManager.addPrimToLandPrimCounts; - - m_eventManager.OnPermissionError += SendPermissionAlert; + RegisterDefaultSceneEvents(); MainLog.Instance.Verbose("Creating new entitities instance"); Entities = new Dictionary(); @@ -244,6 +243,13 @@ namespace OpenSim.Region.Environment.Scenes #endregion #region Startup / Close Methods + + protected virtual void RegisterDefaultSceneEvents() + { + m_eventManager.OnParcelPrimCountAdd += m_LandManager.addPrimToLandPrimCounts; + m_eventManager.OnPermissionError += SendPermissionAlert; + } + public override void Close() { ForEachScenePresence(delegate(ScenePresence avatar) @@ -504,6 +510,7 @@ namespace OpenSim.Region.Environment.Scenes } CreateTerrainTexture(); + CommsManager.GridService.RegisterRegion(RegionInfo); //hack to update the terrain texture in grid mode so it shows on world map } catch (Exception e) { -- cgit v1.1