From 5bf288745d63f057fc5a715e0f67dc3eba0e6dba Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 9 Sep 2009 11:02:31 -0700 Subject: De-hardcode default home locations on create user (standalone). --- OpenSim/Region/Application/OpenSim.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 38874f9..e6ddb5b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -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]; -- cgit v1.1 From c605509da3a690d4050c48418111d7f29f7be9b4 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 9 Sep 2009 16:20:19 -0400 Subject: * Lock timers when Calling Start() and Stop() when the Thread Context is murky. This affects Mono only. --- .../RemoteController/RemoteAdminPlugin.cs | 5 +- .../Rest/Inventory/RestInventoryServices.cs | 7 +- OpenSim/Client/MXP/MXPModule.cs | 11 +++- .../InterMessageUserServerModule.cs | 3 +- .../Region/ClientStack/LindenUDP/LLClientView.cs | 76 ++++++++++++++++------ .../Region/CoreModules/Asset/FlotsamAssetCache.cs | 5 +- .../Scenes/AsyncSceneObjectGroupDeleter.cs | 6 +- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 + 8 files changed, 85 insertions(+), 30 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 67ba016..7e0a4ba 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -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; } diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 59431bb..4e03e67 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -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(); } /// diff --git a/OpenSim/Client/MXP/MXPModule.cs b/OpenSim/Client/MXP/MXPModule.cs index dbe4174..2d28b8c 100644 --- a/OpenSim/Client/MXP/MXPModule.cs +++ b/OpenSim/Client/MXP/MXPModule.cs @@ -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 diff --git a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs index 0eb7b6a..ae04535 100644 --- a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs +++ b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs @@ -58,7 +58,8 @@ namespace OpenSim.Grid.MessagingServer.Modules m_messageCore = messageCore; reconnectTimer.Elapsed += registerWithUserServer; - reconnectTimer.Start(); + lock (reconnectTimer) + reconnectTimer.Start(); } public void Initialise() diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index dd01780..dd50073 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -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(); } } } diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 53b8ebc..49b459a 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -160,7 +160,10 @@ 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 { diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index f8208ec..7ac1e7e 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs @@ -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. diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 40e7471..b0d279c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -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, -- cgit v1.1 From 0034dd043fb1e997f5b9ef12c42ab36e3c984765 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 10 Sep 2009 00:33:00 +0100 Subject: Many databases contain folders with invalid folder ID. Folder IDs are supposed to be within -1 .. 22 and other values break inventory loading. This patch fixes it and allows inventory to load. Invalid folder types will be treated as ordinary folders. --- OpenSim/Framework/Capabilities/Caps.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 665bfe5..1dfb2d4 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -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]; -- cgit v1.1 From dc3798ddc3ad5d3d6c7de0d46cbe669919298c3b Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 10 Sep 2009 00:31:14 -0400 Subject: * Another Timer lock --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 6b0af6d..d85d3df 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -167,7 +167,10 @@ namespace Flotsam.RegionModules.AssetCache } else { - m_CachCleanTimer.Enabled = false; + lock (m_CachCleanTimer) + { + m_CachCleanTimer.Enabled = false; + } } m_CacheDirectoryTiers = assetConfig.GetInt("CacheDirectoryTiers", 1); -- cgit v1.1 From c41387b86462b66479cc547b515820d706dbcd6a Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 10 Sep 2009 15:57:53 +0900 Subject: Formatting cleanup. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 2 +- .../CoreModules/World/Land/RegionCombinerModule.cs | 83 +++++++--------------- 2 files changed, 25 insertions(+), 60 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index dd50073..f6ae639 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3168,7 +3168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_imageManager.ProcessImageQueue(m_textureSendLimit, m_textureDataLimit)) { - lock(m_textureRequestTimer) + lock (m_textureRequestTimer) m_textureRequestTimer.Start(); } } diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs index f513d68..45e09a3 100644 --- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs @@ -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 locations, List uuids, - RegionConnections connectiondata, ScenePresence rootPresence) + RegionConnections connectiondata, ScenePresence rootPresence) { RegionData[] rdata = connectiondata.ConnectedRegions.ToArray(); //List clients = new List(); @@ -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 Locations; @@ -922,7 +890,7 @@ namespace OpenSim.Region.CoreModules.World.Land #region ILandChannel Members public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel, - List regionConnections) + List regionConnections) { RegData = regData; RootRegionLandChannel = rootRegionLandChannel; @@ -937,9 +905,7 @@ namespace OpenSim.Region.CoreModules.World.Land public List 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 m_virtScene = new Dictionary(); private Dictionary m_forwarders = new Dictionary(); + 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); - } } } -- cgit v1.1 From 1c878ec42502e8af2dfe8f25e4d42655dc70712f Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 10 Sep 2009 03:25:55 -0400 Subject: * Fix an off by one error on visible neighbors in the 'RequestNeighbors' method. This off by one error showed one extra row of neighbors on the north and east side --- OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 0827672..1c71a99 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -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