Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
						commit
						552ba5334f
					
				| 
						 | 
				
			
			@ -384,7 +384,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
 | 
			
		|||
                System.Timers.Timer shutdownTimer = new System.Timers.Timer(timeout); // Wait before firing
 | 
			
		||||
                shutdownTimer.AutoReset = false;
 | 
			
		||||
                shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed);
 | 
			
		||||
                shutdownTimer.Start();
 | 
			
		||||
                lock (shutdownTimer)
 | 
			
		||||
                {
 | 
			
		||||
                    shutdownTimer.Start();
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                responseData["success"] = true;
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2177,13 +2177,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
 | 
			
		|||
                watchDog.Interval  = interval;
 | 
			
		||||
                watchDog.AutoReset = false;
 | 
			
		||||
                watchDog.Enabled   = true;
 | 
			
		||||
                watchDog.Start();
 | 
			
		||||
                lock (watchDog)
 | 
			
		||||
                    watchDog.Start();
 | 
			
		||||
                
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            internal void stopWD()
 | 
			
		||||
            {
 | 
			
		||||
                Rest.Log.DebugFormat("{0} Reset watchdog", MsgId);
 | 
			
		||||
                watchDog.Stop();
 | 
			
		||||
                lock (watchDog)
 | 
			
		||||
                    watchDog.Stop();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,7 +81,8 @@ namespace OpenSim.Client.MXP
 | 
			
		|||
                m_ticker.AutoReset = false;
 | 
			
		||||
                m_ticker.Elapsed += ticker_Elapsed;
 | 
			
		||||
 | 
			
		||||
                m_ticker.Start();
 | 
			
		||||
                lock (m_ticker)
 | 
			
		||||
                    m_ticker.Start();
 | 
			
		||||
 | 
			
		||||
                m_log.Info("[MXP ClientStack] MXP Enabled and Listening");
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -99,13 +100,17 @@ namespace OpenSim.Client.MXP
 | 
			
		|||
            }
 | 
			
		||||
 | 
			
		||||
            if (!m_shutdown)
 | 
			
		||||
                m_ticker.Start();
 | 
			
		||||
            {
 | 
			
		||||
                lock (m_ticker)
 | 
			
		||||
                    m_ticker.Start();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Close()
 | 
			
		||||
        {
 | 
			
		||||
            m_shutdown = true;
 | 
			
		||||
            m_ticker.Stop();
 | 
			
		||||
            lock (m_ticker)
 | 
			
		||||
                m_ticker.Stop();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string Name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -502,7 +502,7 @@ namespace OpenSim.Framework.Capabilities
 | 
			
		|||
            llsdFolder.folder_id = invFolder.ID;
 | 
			
		||||
            llsdFolder.parent_id = invFolder.ParentID;
 | 
			
		||||
            llsdFolder.name = invFolder.Name;
 | 
			
		||||
            if (invFolder.Type == -1)
 | 
			
		||||
            if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length)
 | 
			
		||||
                llsdFolder.type = "-1";
 | 
			
		||||
            else
 | 
			
		||||
                llsdFolder.type = TaskInventoryItem.Types[invFolder.Type];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,7 +58,8 @@ namespace OpenSim.Grid.MessagingServer.Modules
 | 
			
		|||
            m_messageCore = messageCore;
 | 
			
		||||
 | 
			
		||||
            reconnectTimer.Elapsed += registerWithUserServer;
 | 
			
		||||
            reconnectTimer.Start();
 | 
			
		||||
            lock (reconnectTimer)
 | 
			
		||||
                reconnectTimer.Start();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Initialise()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1042,6 +1042,14 @@ namespace OpenSim
 | 
			
		|||
            uint regX = 1000;
 | 
			
		||||
            uint regY = 1000;
 | 
			
		||||
 | 
			
		||||
            IConfig standalone;
 | 
			
		||||
            if ((standalone = m_config.Source.Configs["StandAlone"]) != null)
 | 
			
		||||
            {
 | 
			
		||||
                regX = (uint)standalone.GetInt("default_location_x", (int)regX);
 | 
			
		||||
                regY = (uint)standalone.GetInt("default_location_y", (int)regY);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            if (cmdparams.Length < 3)
 | 
			
		||||
                firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
 | 
			
		||||
            else firstName = cmdparams[2];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -581,6 +581,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
 | 
			
		||||
        private void CloseCleanup(bool shutdownCircuit)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            m_scene.RemoveClient(AgentId);
 | 
			
		||||
 | 
			
		||||
            //m_log.InfoFormat("[CLIENTVIEW] Memory pre  GC {0}", System.GC.GetTotalMemory(false));
 | 
			
		||||
| 
						 | 
				
			
			@ -592,12 +594,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // Shut down timers
 | 
			
		||||
            if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop();
 | 
			
		||||
            if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop();
 | 
			
		||||
            if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop();
 | 
			
		||||
            if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop();
 | 
			
		||||
            if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop();
 | 
			
		||||
            // Shut down timers. Thread Context of this method is murky.   Lock all timers
 | 
			
		||||
            if (m_clientPingTimer.Enabled)
 | 
			
		||||
                lock (m_clientPingTimer)
 | 
			
		||||
                    m_clientPingTimer.Stop();
 | 
			
		||||
            if (m_avatarTerseUpdateTimer.Enabled)
 | 
			
		||||
                lock (m_avatarTerseUpdateTimer)
 | 
			
		||||
                    m_avatarTerseUpdateTimer.Stop();
 | 
			
		||||
            if (m_primTerseUpdateTimer.Enabled)
 | 
			
		||||
                lock (m_primTerseUpdateTimer)
 | 
			
		||||
                    m_primTerseUpdateTimer.Stop();
 | 
			
		||||
            if (m_primFullUpdateTimer.Enabled)
 | 
			
		||||
                lock (m_primFullUpdateTimer)
 | 
			
		||||
                    m_primFullUpdateTimer.Stop();
 | 
			
		||||
            if (m_textureRequestTimer.Enabled)
 | 
			
		||||
                lock (m_textureRequestTimer)
 | 
			
		||||
                    m_textureRequestTimer.Stop();
 | 
			
		||||
 | 
			
		||||
            // This is just to give the client a reasonable chance of
 | 
			
		||||
            // flushing out all it's packets.  There should probably
 | 
			
		||||
| 
						 | 
				
			
			@ -676,12 +688,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
 | 
			
		||||
        public void Stop()
 | 
			
		||||
        {
 | 
			
		||||
            // Shut down timers
 | 
			
		||||
            if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop();
 | 
			
		||||
            if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop();
 | 
			
		||||
            if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop();
 | 
			
		||||
            if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop();
 | 
			
		||||
            if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop();
 | 
			
		||||
            // Shut down timers.  Thread Context is Murky, lock all timers!
 | 
			
		||||
            if (m_clientPingTimer.Enabled)
 | 
			
		||||
                lock (m_clientPingTimer)
 | 
			
		||||
                    m_clientPingTimer.Stop();
 | 
			
		||||
 | 
			
		||||
            if (m_avatarTerseUpdateTimer.Enabled)
 | 
			
		||||
                lock (m_avatarTerseUpdateTimer)
 | 
			
		||||
                    m_avatarTerseUpdateTimer.Stop();
 | 
			
		||||
 | 
			
		||||
            if (m_primTerseUpdateTimer.Enabled)
 | 
			
		||||
                lock (m_primTerseUpdateTimer)
 | 
			
		||||
                    m_primTerseUpdateTimer.Stop();
 | 
			
		||||
 | 
			
		||||
            if (m_primFullUpdateTimer.Enabled)
 | 
			
		||||
                lock (m_primFullUpdateTimer)
 | 
			
		||||
                    m_primFullUpdateTimer.Stop();
 | 
			
		||||
 | 
			
		||||
            if (m_textureRequestTimer.Enabled)
 | 
			
		||||
                lock (m_textureRequestTimer)
 | 
			
		||||
                    m_textureRequestTimer.Stop();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Restart()
 | 
			
		||||
| 
						 | 
				
			
			@ -2907,7 +2933,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
                }
 | 
			
		||||
                else if (m_avatarTerseUpdates.Count == 1)
 | 
			
		||||
                {
 | 
			
		||||
                    m_avatarTerseUpdateTimer.Start();                
 | 
			
		||||
                    lock (m_avatarTerseUpdateTimer)
 | 
			
		||||
                        m_avatarTerseUpdateTimer.Start();                
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -2957,7 +2984,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
                OutPacket(terse, ThrottleOutPacketType.Task);
 | 
			
		||||
 | 
			
		||||
                if (m_avatarTerseUpdates.Count == 0)
 | 
			
		||||
                    m_avatarTerseUpdateTimer.Stop();
 | 
			
		||||
                {
 | 
			
		||||
                    lock (m_avatarTerseUpdateTimer)
 | 
			
		||||
                        m_avatarTerseUpdateTimer.Stop();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3138,7 +3168,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
                if (m_imageManager.ProcessImageQueue(m_textureSendLimit, 
 | 
			
		||||
                                                     m_textureDataLimit))
 | 
			
		||||
                {
 | 
			
		||||
                    m_textureRequestTimer.Start();
 | 
			
		||||
                    lock (m_textureRequestTimer)
 | 
			
		||||
                        m_textureRequestTimer.Start();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -3149,7 +3180,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
            {
 | 
			
		||||
                if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled)
 | 
			
		||||
                {
 | 
			
		||||
                    m_primFullUpdateTimer.Stop();
 | 
			
		||||
                    lock (m_primFullUpdateTimer)
 | 
			
		||||
                        m_primFullUpdateTimer.Stop();
 | 
			
		||||
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -3196,7 +3228,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
                OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
 | 
			
		||||
 | 
			
		||||
                if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled)
 | 
			
		||||
                    m_primFullUpdateTimer.Stop();
 | 
			
		||||
                    lock (m_primFullUpdateTimer)
 | 
			
		||||
                        m_primFullUpdateTimer.Stop();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3234,7 +3267,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
            {
 | 
			
		||||
                if (m_primTerseUpdates.Count == 0)
 | 
			
		||||
                {
 | 
			
		||||
                    m_primTerseUpdateTimer.Stop();
 | 
			
		||||
                    lock (m_primTerseUpdateTimer)
 | 
			
		||||
                        m_primTerseUpdateTimer.Stop();
 | 
			
		||||
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -3284,7 +3318,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
                OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
 | 
			
		||||
 | 
			
		||||
                if (m_primTerseUpdates.Count == 0)
 | 
			
		||||
                    m_primTerseUpdateTimer.Stop();
 | 
			
		||||
                    lock (m_primTerseUpdateTimer)
 | 
			
		||||
                        m_primTerseUpdateTimer.Stop();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -6586,7 +6621,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
                            if (m_imageManager != null)
 | 
			
		||||
                            {
 | 
			
		||||
                                m_imageManager.EnqueueReq(args);
 | 
			
		||||
                                m_textureRequestTimer.Start();
 | 
			
		||||
                                lock (m_textureRequestTimer)
 | 
			
		||||
                                    m_textureRequestTimer.Start();
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,11 +160,17 @@ namespace Flotsam.RegionModules.AssetCache
 | 
			
		|||
                        m_CachCleanTimer.AutoReset = true;
 | 
			
		||||
                        m_CachCleanTimer.Elapsed += CleanupExpiredFiles;
 | 
			
		||||
                        m_CachCleanTimer.Enabled = true;
 | 
			
		||||
                        m_CachCleanTimer.Start();
 | 
			
		||||
                        lock (m_CachCleanTimer)
 | 
			
		||||
                        {
 | 
			
		||||
                            m_CachCleanTimer.Start();
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                    {
 | 
			
		||||
                        m_CachCleanTimer.Enabled = false;
 | 
			
		||||
                        lock (m_CachCleanTimer)
 | 
			
		||||
                        {
 | 
			
		||||
                            m_CachCleanTimer.Enabled = false;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    m_CacheDirectoryTiers = assetConfig.GetInt("CacheDirectoryTiers", 1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,10 +42,11 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
    {
 | 
			
		||||
        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 | 
			
		||||
 | 
			
		||||
        public string Name { get
 | 
			
		||||
        public string Name
 | 
			
		||||
        {
 | 
			
		||||
            return "RegionCombinerModule";
 | 
			
		||||
        } }
 | 
			
		||||
            get { return "RegionCombinerModule"; }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Type ReplaceableInterface
 | 
			
		||||
        {
 | 
			
		||||
            get { return null; }
 | 
			
		||||
| 
						 | 
				
			
			@ -57,29 +58,21 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
        public void Initialise(IConfigSource source)
 | 
			
		||||
        {
 | 
			
		||||
         
 | 
			
		||||
            IConfig myConfig = source.Configs["Startup"];
 | 
			
		||||
            enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
 | 
			
		||||
            //enabledYN = true;
 | 
			
		||||
           
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Close()
 | 
			
		||||
        {
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddRegion(Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
           
 | 
			
		||||
            
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void RemoveRegion(Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
           
 | 
			
		||||
                
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void RegionLoaded(Scene scene)
 | 
			
		||||
| 
						 | 
				
			
			@ -304,12 +297,10 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
                        conn.UpdateExtents(extents);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                        m_log.DebugFormat("Scene: {0} to the west of Scene{1} Offset: {2}. Extents:{3}",
 | 
			
		||||
                                          conn.RegionScene.RegionInfo.RegionName,
 | 
			
		||||
                                          regionConnections.RegionScene.RegionInfo.RegionName, offset, extents);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                        scene.BordersLocked = true;
 | 
			
		||||
                        conn.RegionScene.BordersLocked = true;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -347,8 +338,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    // If we're one region over x +y
 | 
			
		||||
                    //xyx
 | 
			
		||||
                    //xxx
 | 
			
		||||
| 
						 | 
				
			
			@ -369,7 +358,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        extents.X = conn.XEnd;
 | 
			
		||||
                        conn.UpdateExtents(extents);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                        scene.BordersLocked = true;
 | 
			
		||||
                        conn.RegionScene.BordersLocked = true;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -382,6 +370,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        m_log.DebugFormat("Scene: {0} to the northeast of Scene{1} Offset: {2}. Extents:{3}",
 | 
			
		||||
                                         conn.RegionScene.RegionInfo.RegionName,
 | 
			
		||||
                                         regionConnections.RegionScene.RegionInfo.RegionName, offset, extents);
 | 
			
		||||
 | 
			
		||||
                        conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents);
 | 
			
		||||
                        scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -444,6 +433,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents);
 | 
			
		||||
                        scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero);
 | 
			
		||||
                        lock (conn.RegionScene.NorthBorders)
 | 
			
		||||
                        {
 | 
			
		||||
                            if (conn.RegionScene.NorthBorders.Count == 1)// &&  2)
 | 
			
		||||
                            {
 | 
			
		||||
                                //compound border
 | 
			
		||||
| 
						 | 
				
			
			@ -454,14 +444,13 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                                    conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize;
 | 
			
		||||
                                lock (conn.RegionScene.WestBorders)
 | 
			
		||||
                                    conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        lock (scene.SouthBorders)
 | 
			
		||||
                            scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south
 | 
			
		||||
 | 
			
		||||
                        lock (conn.RegionScene.EastBorders)
 | 
			
		||||
                        {
 | 
			
		||||
                            if (conn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2)
 | 
			
		||||
                            {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -473,7 +462,8 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                        
 | 
			
		||||
                        lock (scene.WestBorders)
 | 
			
		||||
                            scene.WestBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport West
 | 
			
		||||
                        /*  
 | 
			
		||||
| 
						 | 
				
			
			@ -503,9 +493,8 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (!connectedYN)
 | 
			
		||||
                {
 | 
			
		||||
                    RegionData rdata = new RegionData();
 | 
			
		||||
| 
						 | 
				
			
			@ -528,9 +517,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                    regionConnections.ClientEventForwarder = new RegionCombinerClientEventForwarder(regionConnections);
 | 
			
		||||
                    scene.EventManager.OnNewPresence += SetCourseLocationDelegate;
 | 
			
		||||
                    m_regions.Add(scene.RegionInfo.originRegionID, regionConnections);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
            AdjustLargeRegionBounds();
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -585,7 +572,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        private void DistributeCourseLocationUpdates(List<Vector3> locations, List<UUID> uuids, 
 | 
			
		||||
                            RegionConnections connectiondata, ScenePresence rootPresence)
 | 
			
		||||
                                                     RegionConnections connectiondata, ScenePresence rootPresence)
 | 
			
		||||
        {
 | 
			
		||||
            RegionData[] rdata = connectiondata.ConnectedRegions.ToArray();
 | 
			
		||||
            //List<IClientAPI> clients = new List<IClientAPI>();
 | 
			
		||||
| 
						 | 
				
			
			@ -621,7 +608,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            }
 | 
			
		||||
 | 
			
		||||
            // go over the locations and assign them to an IClientAPI
 | 
			
		||||
            for (int i = 0; i < locations.Count;i++ )
 | 
			
		||||
            for (int i = 0; i < locations.Count; i++)
 | 
			
		||||
            //{locations[i]/(int) Constants.RegionSize;
 | 
			
		||||
            {
 | 
			
		||||
                Vector3 pPosition = new Vector3((int)locations[i].X / (int)Constants.RegionSize, 
 | 
			
		||||
| 
						 | 
				
			
			@ -643,12 +630,10 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        updatedata.UserAPI = LocateUsersChildAgentIClientAPI(offset, rootPresence.UUID, rdata);
 | 
			
		||||
 | 
			
		||||
                    updates.Add(offset,updatedata);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                updates[offset].Locations.Add(locations[i]);
 | 
			
		||||
                updates[offset].Uuids.Add(uuids[i]);
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Send out the CoarseLocationupdates from their respective client connection based on where the avatar is
 | 
			
		||||
| 
						 | 
				
			
			@ -659,7 +644,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                    updates[offset].UserAPI.SendCoarseLocationUpdate(updates[offset].Uuids,updates[offset].Locations);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private IClientAPI LocateUsersChildAgentIClientAPI(Vector2 offset, UUID uUID, RegionData[] rdata)
 | 
			
		||||
| 
						 | 
				
			
			@ -678,11 +662,8 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
        public void PostInitialise()
 | 
			
		||||
        {
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        public void UnCombineRegion(RegionData rdata)
 | 
			
		||||
        {
 | 
			
		||||
            lock (m_regions)
 | 
			
		||||
| 
						 | 
				
			
			@ -706,6 +687,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Create a set of infinite borders around the whole aabb of the combined island.
 | 
			
		||||
        private void AdjustLargeRegionBounds()
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -719,12 +701,10 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                    {
 | 
			
		||||
                        if (rdata.Offset.X > offset.X) offset.X = rdata.Offset.X;
 | 
			
		||||
                        if (rdata.Offset.Y > offset.Y) offset.Y = rdata.Offset.Y;
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    lock (rconn.RegionScene.NorthBorders)
 | 
			
		||||
                    {
 | 
			
		||||
                        
 | 
			
		||||
                        Border northBorder = null;
 | 
			
		||||
                        
 | 
			
		||||
                        if (!TryGetInfiniteBorder(rconn.RegionScene.NorthBorders, out northBorder))
 | 
			
		||||
| 
						 | 
				
			
			@ -736,7 +716,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,
 | 
			
		||||
                                                             offset.Y + (int) Constants.RegionSize); //<---
 | 
			
		||||
                        northBorder.CrossDirection = Cardinals.N;
 | 
			
		||||
                        
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    lock (rconn.RegionScene.SouthBorders)
 | 
			
		||||
| 
						 | 
				
			
			@ -749,7 +728,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        }
 | 
			
		||||
                        southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
 | 
			
		||||
                        southBorder.CrossDirection = Cardinals.S;
 | 
			
		||||
                        
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    lock (rconn.RegionScene.EastBorders)
 | 
			
		||||
| 
						 | 
				
			
			@ -763,7 +741,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.X + (int)Constants.RegionSize);
 | 
			
		||||
                        //<---
 | 
			
		||||
                        eastBorder.CrossDirection = Cardinals.E;
 | 
			
		||||
                        
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    lock (rconn.RegionScene.WestBorders)
 | 
			
		||||
| 
						 | 
				
			
			@ -777,11 +754,8 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
                        }
 | 
			
		||||
                        westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
 | 
			
		||||
                        westBorder.CrossDirection = Cardinals.W;
 | 
			
		||||
                        
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    rconn.RegionScene.BordersLocked = false;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -823,8 +797,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            if (BigRegion.PermissionModule == null)
 | 
			
		||||
                BigRegion.PermissionModule = new RegionCombinerPermissionModule(BigRegion.RegionScene);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            VirtualRegion.Permissions.OnBypassPermissions += BigRegion.PermissionModule.BypassPermissions;
 | 
			
		||||
            VirtualRegion.Permissions.OnSetBypassPermissions += BigRegion.PermissionModule.SetBypassPermissions;
 | 
			
		||||
            VirtualRegion.Permissions.OnPropagatePermissions += BigRegion.PermissionModule.PropagatePermissions;
 | 
			
		||||
| 
						 | 
				
			
			@ -855,27 +827,24 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            VirtualRegion.Permissions.OnLinkObject += BigRegion.PermissionModule.CanLinkObject; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnDelinkObject += BigRegion.PermissionModule.CanDelinkObject; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnBuyLand += BigRegion.PermissionModule.CanBuyLand; //NOT YET IMPLEMENTED
 | 
			
		||||
 | 
			
		||||
            VirtualRegion.Permissions.OnViewNotecard += BigRegion.PermissionModule.CanViewNotecard; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnViewScript += BigRegion.PermissionModule.CanViewScript; //NOT YET IMPLEMENTED                       
 | 
			
		||||
            VirtualRegion.Permissions.OnEditNotecard += BigRegion.PermissionModule.CanEditNotecard; //NOT YET IMPLEMENTED            
 | 
			
		||||
            VirtualRegion.Permissions.OnEditScript += BigRegion.PermissionModule.CanEditScript; //NOT YET IMPLEMENTED            
 | 
			
		||||
 | 
			
		||||
            VirtualRegion.Permissions.OnCreateObjectInventory += BigRegion.PermissionModule.CanCreateObjectInventory; //NOT IMPLEMENTED HERE 
 | 
			
		||||
            VirtualRegion.Permissions.OnEditObjectInventory += BigRegion.PermissionModule.CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED            
 | 
			
		||||
            VirtualRegion.Permissions.OnCopyObjectInventory += BigRegion.PermissionModule.CanCopyObjectInventory; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnDeleteObjectInventory += BigRegion.PermissionModule.CanDeleteObjectInventory; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnResetScript += BigRegion.PermissionModule.CanResetScript;
 | 
			
		||||
 | 
			
		||||
            VirtualRegion.Permissions.OnCreateUserInventory += BigRegion.PermissionModule.CanCreateUserInventory; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnCopyUserInventory += BigRegion.PermissionModule.CanCopyUserInventory; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnEditUserInventory += BigRegion.PermissionModule.CanEditUserInventory; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnDeleteUserInventory += BigRegion.PermissionModule.CanDeleteUserInventory; //NOT YET IMPLEMENTED
 | 
			
		||||
 | 
			
		||||
            VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED
 | 
			
		||||
            VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionConnections
 | 
			
		||||
    {
 | 
			
		||||
        public UUID RegionId;
 | 
			
		||||
| 
						 | 
				
			
			@ -893,7 +862,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            XEnd = (int)extents.X;
 | 
			
		||||
            YEnd = (int)extents.Y;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionData
 | 
			
		||||
| 
						 | 
				
			
			@ -901,8 +869,8 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
        public UUID RegionId;
 | 
			
		||||
        public Scene RegionScene;
 | 
			
		||||
        public Vector3 Offset;
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    struct RegionCourseLocationStruct
 | 
			
		||||
    {
 | 
			
		||||
        public List<Vector3> Locations;
 | 
			
		||||
| 
						 | 
				
			
			@ -922,7 +890,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
        #region ILandChannel Members
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,
 | 
			
		||||
            List<RegionData> regionConnections)
 | 
			
		||||
                                              List<RegionData> regionConnections)
 | 
			
		||||
        {
 | 
			
		||||
            RegData = regData;
 | 
			
		||||
            RootRegionLandChannel = rootRegionLandChannel;
 | 
			
		||||
| 
						 | 
				
			
			@ -937,9 +905,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
        public List<ILandObject> AllParcels()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            return RootRegionLandChannel.AllParcels();
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(int x, int y)
 | 
			
		||||
| 
						 | 
				
			
			@ -1044,12 +1010,14 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
    public class RegionCombinerPermissionModule
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerPermissionModule(Scene RootScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = RootScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #region Permission Override
 | 
			
		||||
 | 
			
		||||
        public bool BypassPermissions()
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.BypassPermissions();
 | 
			
		||||
| 
						 | 
				
			
			@ -1274,6 +1242,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1283,14 +1252,13 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
        private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>();
 | 
			
		||||
        private Dictionary<UUID,RegionCombinerModuleIndividualForwarder> m_forwarders = new Dictionary<UUID, 
 | 
			
		||||
            RegionCombinerModuleIndividualForwarder>();
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerClientEventForwarder(RegionConnections rootScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = rootScene.RegionScene;
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddSceneToEventForwarding( Scene virtualScene )
 | 
			
		||||
        public void AddSceneToEventForwarding(Scene virtualScene)
 | 
			
		||||
        {
 | 
			
		||||
            lock (m_virtScene)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -1342,6 +1310,7 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
        private Scene m_virtScene;
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerModuleIndividualForwarder(Scene rootScene, Scene virtScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = rootScene;
 | 
			
		||||
| 
						 | 
				
			
			@ -1350,7 +1319,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
        public void ClientConnect(IClientAPI client)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            m_virtScene.UnSubscribeToClientPrimEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientPrimRezEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientInventoryEvents(client);
 | 
			
		||||
| 
						 | 
				
			
			@ -1370,12 +1338,11 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            m_rootScene.SubscribeToClientGodEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientNetworkEvents(client);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ClientClosed(UUID clientid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart, 
 | 
			
		||||
            UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem, 
 | 
			
		||||
            UUID fromtaskid)
 | 
			
		||||
| 
						 | 
				
			
			@ -1389,7 +1356,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
 | 
			
		||||
            m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast,
 | 
			
		||||
                                  rayendisintersection, rezselected, removeitem, fromtaskid);
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot, 
 | 
			
		||||
| 
						 | 
				
			
			@ -1404,7 +1370,6 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            raystart.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid,
 | 
			
		||||
                                   rayendisintersection);
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,8 @@ namespace OpenSim.Region.Framework.Scenes
 | 
			
		|||
                bool permissionToDelete)
 | 
			
		||||
        {
 | 
			
		||||
            if (Enabled)
 | 
			
		||||
                m_inventoryTicker.Stop();
 | 
			
		||||
                lock (m_inventoryTicker)
 | 
			
		||||
                    m_inventoryTicker.Stop();
 | 
			
		||||
 | 
			
		||||
            lock (m_inventoryDeletes)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +94,8 @@ namespace OpenSim.Region.Framework.Scenes
 | 
			
		|||
            }
 | 
			
		||||
 | 
			
		||||
            if (Enabled)
 | 
			
		||||
                m_inventoryTicker.Start();
 | 
			
		||||
                lock (m_inventoryTicker)
 | 
			
		||||
                    m_inventoryTicker.Start();
 | 
			
		||||
        
 | 
			
		||||
            // Visually remove it, even if it isnt really gone yet.  This means that if we crash before the object
 | 
			
		||||
            // has gone to inventory, it will reappear in the region again on restart instead of being lost.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -443,8 +443,8 @@ namespace OpenSim.Region.Framework.Scenes
 | 
			
		|||
                int startX = (int) pRegionLocX - 1;
 | 
			
		||||
                int startY = (int) pRegionLocY - 1;
 | 
			
		||||
 | 
			
		||||
                int endX = (int) pRegionLocX + (int)extent.X + 1;
 | 
			
		||||
                int endY = (int) pRegionLocY + (int)extent.Y + 1;
 | 
			
		||||
                int endX = (int) pRegionLocX + (int)extent.X;
 | 
			
		||||
                int endY = (int) pRegionLocY + (int)extent.Y;
 | 
			
		||||
 | 
			
		||||
                for (int i=startX;i<endX;i++)
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3762,6 +3762,8 @@ if (m_shape != null) {
 | 
			
		|||
                    lPos = AbsolutePosition;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Causes this thread to dig into the Client Thread Data.
 | 
			
		||||
            // Remember your locking here!
 | 
			
		||||
            remoteClient.SendPrimTerseUpdate(m_regionHandle,
 | 
			
		||||
                    (ushort)(m_parentGroup.GetTimeDilation() *
 | 
			
		||||
                    (float)ushort.MaxValue), LocalId, lPos,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue