From f41379549773531b2886b64aaacf57c954a64610 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 25 Jun 2007 16:01:30 +0000 Subject: updated prebuild.xml. Added some more events to IClientAPI (OnGrapObject , OnGrapUpdate, OnDeGrapObject). --- OpenSim/OpenSim.Region/Scenes/Scene.cs | 85 +++------------------------------- 1 file changed, 6 insertions(+), 79 deletions(-) (limited to 'OpenSim/OpenSim.Region/Scenes/Scene.cs') diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs index 62edc4b..426dd50 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs @@ -57,19 +57,18 @@ namespace OpenSim.Region.Scenes protected Dictionary Prims; private PhysicsScene phyScene; private float timeStep = 0.1f; - public ILocalStorage localStorage; private Random Rand = new Random(); private uint _primCount = 702000; private int storageCount; private Dictionary m_scriptHandlers; private Dictionary m_scripts; private Mutex updateLock; - public string m_datastore; + protected AuthenticateSessionsBase authenticateHandler; protected RegionCommsListener regionCommsHost; protected CommunicationsManager commsManager; - protected List capsHandlers = new List(); + protected Dictionary capsHandlers = new Dictionary(); protected BaseHttpServer httpListener; public ParcelManager parcelManager; @@ -127,7 +126,6 @@ namespace OpenSim.Region.Scenes Prims = new Dictionary(); OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs - creating LandMap"); - TerrainManager = new TerrainManager(new SecondLife()); Terrain = new TerrainEngine(); ScenePresence.LoadAnims(); @@ -271,53 +269,6 @@ namespace OpenSim.Region.Scenes } #endregion - #region Setup Methods - /// - /// Loads a new storage subsystem from a named library - /// - /// Storage Library - /// Successful or not - public bool LoadStorageDLL(string dllName) - { - try - { - Assembly pluginAssembly = Assembly.LoadFrom(dllName); - ILocalStorage store = null; - - foreach (Type pluginType in pluginAssembly.GetTypes()) - { - if (pluginType.IsPublic) - { - if (!pluginType.IsAbstract) - { - Type typeInterface = pluginType.GetInterface("ILocalStorage", true); - - if (typeInterface != null) - { - ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - store = plug; - - store.Initialise(this.m_datastore); - break; - } - - typeInterface = null; - } - } - } - pluginAssembly = null; - this.localStorage = store; - return (store == null); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); - return false; - } - } - - #endregion - #region Regenerate Terrain /// @@ -558,6 +509,8 @@ namespace OpenSim.Region.Scenes remoteClient.OnUpdatePrimPosition += this.UpdatePrimPosition; remoteClient.OnRequestMapBlocks += this.RequestMapBlocks; remoteClient.OnTeleportLocationRequest += this.RequestTeleportLocation; + //remoteClient.OnObjectSelect += this.SelectPrim; + remoteClient.OnGrapUpdate += this.MoveObject; /* remoteClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(parcelManager.handleParcelPropertiesRequest); remoteClient.OnParcelDivideRequest += new ParcelDivideRequest(parcelManager.handleParcelDivideRequest); @@ -680,22 +633,6 @@ namespace OpenSim.Region.Scenes } #endregion - #region ShutDown - /// - /// Tidy before shutdown - /// - public override void Close() - { - try - { - this.localStorage.ShutDown(); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); - } - } - #endregion #region RegionCommsHost @@ -729,7 +666,7 @@ namespace OpenSim.Region.Scenes //Console.WriteLine("new user, so creating caps handler for it"); Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.CommsIPListenAddr, 9000, agent.CapsPath, agent.AgentID); cap.RegisterHandlers(); - this.capsHandlers.Add(cap); + this.capsHandlers.Add(agent.AgentID, cap); } this.authenticateHandler.AddNewCircuit(agent.circuitcode, agent); } @@ -767,6 +704,7 @@ namespace OpenSim.Region.Scenes agent.child = true; this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr), (ushort)neighbours[i].CommsIPListenPort); + //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); } } } @@ -845,16 +783,5 @@ namespace OpenSim.Region.Scenes } #endregion - - /// - /// - /// - /// - /// - /// - public override void SendLayerData(int px, int py, IClientAPI RemoteClient) - { - RemoteClient.SendLayerData(px, py, Terrain.getHeights1D()); - } } } -- cgit v1.1