diff options
12 files changed, 124 insertions, 93 deletions
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 | |||
384 | System.Timers.Timer shutdownTimer = new System.Timers.Timer(timeout); // Wait before firing | 384 | System.Timers.Timer shutdownTimer = new System.Timers.Timer(timeout); // Wait before firing |
385 | shutdownTimer.AutoReset = false; | 385 | shutdownTimer.AutoReset = false; |
386 | shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed); | 386 | shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed); |
387 | shutdownTimer.Start(); | 387 | lock (shutdownTimer) |
388 | { | ||
389 | shutdownTimer.Start(); | ||
390 | } | ||
388 | 391 | ||
389 | responseData["success"] = true; | 392 | responseData["success"] = true; |
390 | } | 393 | } |
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 | |||
2177 | watchDog.Interval = interval; | 2177 | watchDog.Interval = interval; |
2178 | watchDog.AutoReset = false; | 2178 | watchDog.AutoReset = false; |
2179 | watchDog.Enabled = true; | 2179 | watchDog.Enabled = true; |
2180 | watchDog.Start(); | 2180 | lock (watchDog) |
2181 | watchDog.Start(); | ||
2182 | |||
2181 | } | 2183 | } |
2182 | 2184 | ||
2183 | internal void stopWD() | 2185 | internal void stopWD() |
2184 | { | 2186 | { |
2185 | Rest.Log.DebugFormat("{0} Reset watchdog", MsgId); | 2187 | Rest.Log.DebugFormat("{0} Reset watchdog", MsgId); |
2186 | watchDog.Stop(); | 2188 | lock (watchDog) |
2189 | watchDog.Stop(); | ||
2187 | } | 2190 | } |
2188 | 2191 | ||
2189 | /// <summary> | 2192 | /// <summary> |
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 | |||
81 | m_ticker.AutoReset = false; | 81 | m_ticker.AutoReset = false; |
82 | m_ticker.Elapsed += ticker_Elapsed; | 82 | m_ticker.Elapsed += ticker_Elapsed; |
83 | 83 | ||
84 | m_ticker.Start(); | 84 | lock (m_ticker) |
85 | m_ticker.Start(); | ||
85 | 86 | ||
86 | m_log.Info("[MXP ClientStack] MXP Enabled and Listening"); | 87 | m_log.Info("[MXP ClientStack] MXP Enabled and Listening"); |
87 | } | 88 | } |
@@ -99,13 +100,17 @@ namespace OpenSim.Client.MXP | |||
99 | } | 100 | } |
100 | 101 | ||
101 | if (!m_shutdown) | 102 | if (!m_shutdown) |
102 | m_ticker.Start(); | 103 | { |
104 | lock (m_ticker) | ||
105 | m_ticker.Start(); | ||
106 | } | ||
103 | } | 107 | } |
104 | 108 | ||
105 | public void Close() | 109 | public void Close() |
106 | { | 110 | { |
107 | m_shutdown = true; | 111 | m_shutdown = true; |
108 | m_ticker.Stop(); | 112 | lock (m_ticker) |
113 | m_ticker.Stop(); | ||
109 | } | 114 | } |
110 | 115 | ||
111 | public string Name | 116 | public string Name |
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 | |||
502 | llsdFolder.folder_id = invFolder.ID; | 502 | llsdFolder.folder_id = invFolder.ID; |
503 | llsdFolder.parent_id = invFolder.ParentID; | 503 | llsdFolder.parent_id = invFolder.ParentID; |
504 | llsdFolder.name = invFolder.Name; | 504 | llsdFolder.name = invFolder.Name; |
505 | if (invFolder.Type == -1) | 505 | if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length) |
506 | llsdFolder.type = "-1"; | 506 | llsdFolder.type = "-1"; |
507 | else | 507 | else |
508 | llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; | 508 | llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; |
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 | |||
58 | m_messageCore = messageCore; | 58 | m_messageCore = messageCore; |
59 | 59 | ||
60 | reconnectTimer.Elapsed += registerWithUserServer; | 60 | reconnectTimer.Elapsed += registerWithUserServer; |
61 | reconnectTimer.Start(); | 61 | lock (reconnectTimer) |
62 | reconnectTimer.Start(); | ||
62 | } | 63 | } |
63 | 64 | ||
64 | public void Initialise() | 65 | public void Initialise() |
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 | |||
1042 | uint regX = 1000; | 1042 | uint regX = 1000; |
1043 | uint regY = 1000; | 1043 | uint regY = 1000; |
1044 | 1044 | ||
1045 | IConfig standalone; | ||
1046 | if ((standalone = m_config.Source.Configs["StandAlone"]) != null) | ||
1047 | { | ||
1048 | regX = (uint)standalone.GetInt("default_location_x", (int)regX); | ||
1049 | regY = (uint)standalone.GetInt("default_location_y", (int)regY); | ||
1050 | } | ||
1051 | |||
1052 | |||
1045 | if (cmdparams.Length < 3) | 1053 | if (cmdparams.Length < 3) |
1046 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); | 1054 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); |
1047 | else firstName = cmdparams[2]; | 1055 | else firstName = cmdparams[2]; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index dd01780..f6ae639 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -581,6 +581,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
581 | 581 | ||
582 | private void CloseCleanup(bool shutdownCircuit) | 582 | private void CloseCleanup(bool shutdownCircuit) |
583 | { | 583 | { |
584 | |||
585 | |||
584 | m_scene.RemoveClient(AgentId); | 586 | m_scene.RemoveClient(AgentId); |
585 | 587 | ||
586 | //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); | 588 | //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); |
@@ -592,12 +594,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
592 | 594 | ||
593 | Thread.Sleep(2000); | 595 | Thread.Sleep(2000); |
594 | 596 | ||
595 | // Shut down timers | 597 | // Shut down timers. Thread Context of this method is murky. Lock all timers |
596 | if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop(); | 598 | if (m_clientPingTimer.Enabled) |
597 | if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop(); | 599 | lock (m_clientPingTimer) |
598 | if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop(); | 600 | m_clientPingTimer.Stop(); |
599 | if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop(); | 601 | if (m_avatarTerseUpdateTimer.Enabled) |
600 | if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop(); | 602 | lock (m_avatarTerseUpdateTimer) |
603 | m_avatarTerseUpdateTimer.Stop(); | ||
604 | if (m_primTerseUpdateTimer.Enabled) | ||
605 | lock (m_primTerseUpdateTimer) | ||
606 | m_primTerseUpdateTimer.Stop(); | ||
607 | if (m_primFullUpdateTimer.Enabled) | ||
608 | lock (m_primFullUpdateTimer) | ||
609 | m_primFullUpdateTimer.Stop(); | ||
610 | if (m_textureRequestTimer.Enabled) | ||
611 | lock (m_textureRequestTimer) | ||
612 | m_textureRequestTimer.Stop(); | ||
601 | 613 | ||
602 | // This is just to give the client a reasonable chance of | 614 | // This is just to give the client a reasonable chance of |
603 | // flushing out all it's packets. There should probably | 615 | // flushing out all it's packets. There should probably |
@@ -676,12 +688,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
676 | 688 | ||
677 | public void Stop() | 689 | public void Stop() |
678 | { | 690 | { |
679 | // Shut down timers | 691 | // Shut down timers. Thread Context is Murky, lock all timers! |
680 | if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop(); | 692 | if (m_clientPingTimer.Enabled) |
681 | if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop(); | 693 | lock (m_clientPingTimer) |
682 | if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop(); | 694 | m_clientPingTimer.Stop(); |
683 | if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop(); | 695 | |
684 | if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop(); | 696 | if (m_avatarTerseUpdateTimer.Enabled) |
697 | lock (m_avatarTerseUpdateTimer) | ||
698 | m_avatarTerseUpdateTimer.Stop(); | ||
699 | |||
700 | if (m_primTerseUpdateTimer.Enabled) | ||
701 | lock (m_primTerseUpdateTimer) | ||
702 | m_primTerseUpdateTimer.Stop(); | ||
703 | |||
704 | if (m_primFullUpdateTimer.Enabled) | ||
705 | lock (m_primFullUpdateTimer) | ||
706 | m_primFullUpdateTimer.Stop(); | ||
707 | |||
708 | if (m_textureRequestTimer.Enabled) | ||
709 | lock (m_textureRequestTimer) | ||
710 | m_textureRequestTimer.Stop(); | ||
685 | } | 711 | } |
686 | 712 | ||
687 | public void Restart() | 713 | public void Restart() |
@@ -2907,7 +2933,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2907 | } | 2933 | } |
2908 | else if (m_avatarTerseUpdates.Count == 1) | 2934 | else if (m_avatarTerseUpdates.Count == 1) |
2909 | { | 2935 | { |
2910 | m_avatarTerseUpdateTimer.Start(); | 2936 | lock (m_avatarTerseUpdateTimer) |
2937 | m_avatarTerseUpdateTimer.Start(); | ||
2911 | } | 2938 | } |
2912 | } | 2939 | } |
2913 | } | 2940 | } |
@@ -2957,7 +2984,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2957 | OutPacket(terse, ThrottleOutPacketType.Task); | 2984 | OutPacket(terse, ThrottleOutPacketType.Task); |
2958 | 2985 | ||
2959 | if (m_avatarTerseUpdates.Count == 0) | 2986 | if (m_avatarTerseUpdates.Count == 0) |
2960 | m_avatarTerseUpdateTimer.Stop(); | 2987 | { |
2988 | lock (m_avatarTerseUpdateTimer) | ||
2989 | m_avatarTerseUpdateTimer.Stop(); | ||
2990 | } | ||
2961 | } | 2991 | } |
2962 | } | 2992 | } |
2963 | 2993 | ||
@@ -3138,7 +3168,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3138 | if (m_imageManager.ProcessImageQueue(m_textureSendLimit, | 3168 | if (m_imageManager.ProcessImageQueue(m_textureSendLimit, |
3139 | m_textureDataLimit)) | 3169 | m_textureDataLimit)) |
3140 | { | 3170 | { |
3141 | m_textureRequestTimer.Start(); | 3171 | lock (m_textureRequestTimer) |
3172 | m_textureRequestTimer.Start(); | ||
3142 | } | 3173 | } |
3143 | } | 3174 | } |
3144 | } | 3175 | } |
@@ -3149,7 +3180,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3149 | { | 3180 | { |
3150 | if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled) | 3181 | if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled) |
3151 | { | 3182 | { |
3152 | m_primFullUpdateTimer.Stop(); | 3183 | lock (m_primFullUpdateTimer) |
3184 | m_primFullUpdateTimer.Stop(); | ||
3153 | 3185 | ||
3154 | return; | 3186 | return; |
3155 | } | 3187 | } |
@@ -3196,7 +3228,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3196 | OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); | 3228 | OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); |
3197 | 3229 | ||
3198 | if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled) | 3230 | if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled) |
3199 | m_primFullUpdateTimer.Stop(); | 3231 | lock (m_primFullUpdateTimer) |
3232 | m_primFullUpdateTimer.Stop(); | ||
3200 | } | 3233 | } |
3201 | } | 3234 | } |
3202 | 3235 | ||
@@ -3234,7 +3267,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3234 | { | 3267 | { |
3235 | if (m_primTerseUpdates.Count == 0) | 3268 | if (m_primTerseUpdates.Count == 0) |
3236 | { | 3269 | { |
3237 | m_primTerseUpdateTimer.Stop(); | 3270 | lock (m_primTerseUpdateTimer) |
3271 | m_primTerseUpdateTimer.Stop(); | ||
3238 | 3272 | ||
3239 | return; | 3273 | return; |
3240 | } | 3274 | } |
@@ -3284,7 +3318,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3284 | OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); | 3318 | OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); |
3285 | 3319 | ||
3286 | if (m_primTerseUpdates.Count == 0) | 3320 | if (m_primTerseUpdates.Count == 0) |
3287 | m_primTerseUpdateTimer.Stop(); | 3321 | lock (m_primTerseUpdateTimer) |
3322 | m_primTerseUpdateTimer.Stop(); | ||
3288 | } | 3323 | } |
3289 | } | 3324 | } |
3290 | 3325 | ||
@@ -6586,7 +6621,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6586 | if (m_imageManager != null) | 6621 | if (m_imageManager != null) |
6587 | { | 6622 | { |
6588 | m_imageManager.EnqueueReq(args); | 6623 | m_imageManager.EnqueueReq(args); |
6589 | m_textureRequestTimer.Start(); | 6624 | lock (m_textureRequestTimer) |
6625 | m_textureRequestTimer.Start(); | ||
6590 | } | 6626 | } |
6591 | } | 6627 | } |
6592 | } | 6628 | } |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index c520356..d85d3df 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -160,11 +160,17 @@ namespace Flotsam.RegionModules.AssetCache | |||
160 | m_CachCleanTimer.AutoReset = true; | 160 | m_CachCleanTimer.AutoReset = true; |
161 | m_CachCleanTimer.Elapsed += CleanupExpiredFiles; | 161 | m_CachCleanTimer.Elapsed += CleanupExpiredFiles; |
162 | m_CachCleanTimer.Enabled = true; | 162 | m_CachCleanTimer.Enabled = true; |
163 | m_CachCleanTimer.Start(); | 163 | lock (m_CachCleanTimer) |
164 | { | ||
165 | m_CachCleanTimer.Start(); | ||
166 | } | ||
164 | } | 167 | } |
165 | else | 168 | else |
166 | { | 169 | { |
167 | m_CachCleanTimer.Enabled = false; | 170 | lock (m_CachCleanTimer) |
171 | { | ||
172 | m_CachCleanTimer.Enabled = false; | ||
173 | } | ||
168 | } | 174 | } |
169 | 175 | ||
170 | m_CacheDirectoryTiers = assetConfig.GetInt("CacheDirectoryTiers", 1); | 176 | m_CacheDirectoryTiers = assetConfig.GetInt("CacheDirectoryTiers", 1); |
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 | |||
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | public string Name { get | 45 | public string Name |
46 | { | 46 | { |
47 | return "RegionCombinerModule"; | 47 | get { return "RegionCombinerModule"; } |
48 | } } | 48 | } |
49 | |||
49 | public Type ReplaceableInterface | 50 | public Type ReplaceableInterface |
50 | { | 51 | { |
51 | get { return null; } | 52 | get { return null; } |
@@ -57,29 +58,21 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
57 | 58 | ||
58 | public void Initialise(IConfigSource source) | 59 | public void Initialise(IConfigSource source) |
59 | { | 60 | { |
60 | |||
61 | IConfig myConfig = source.Configs["Startup"]; | 61 | IConfig myConfig = source.Configs["Startup"]; |
62 | enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); | 62 | enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); |
63 | //enabledYN = true; | 63 | //enabledYN = true; |
64 | |||
65 | } | 64 | } |
66 | 65 | ||
67 | public void Close() | 66 | public void Close() |
68 | { | 67 | { |
69 | |||
70 | } | 68 | } |
71 | 69 | ||
72 | public void AddRegion(Scene scene) | 70 | public void AddRegion(Scene scene) |
73 | { | 71 | { |
74 | |||
75 | |||
76 | |||
77 | } | 72 | } |
78 | 73 | ||
79 | public void RemoveRegion(Scene scene) | 74 | public void RemoveRegion(Scene scene) |
80 | { | 75 | { |
81 | |||
82 | |||
83 | } | 76 | } |
84 | 77 | ||
85 | public void RegionLoaded(Scene scene) | 78 | public void RegionLoaded(Scene scene) |
@@ -304,12 +297,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
304 | 297 | ||
305 | conn.UpdateExtents(extents); | 298 | conn.UpdateExtents(extents); |
306 | 299 | ||
307 | |||
308 | m_log.DebugFormat("Scene: {0} to the west of Scene{1} Offset: {2}. Extents:{3}", | 300 | m_log.DebugFormat("Scene: {0} to the west of Scene{1} Offset: {2}. Extents:{3}", |
309 | conn.RegionScene.RegionInfo.RegionName, | 301 | conn.RegionScene.RegionInfo.RegionName, |
310 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | 302 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); |
311 | 303 | ||
312 | |||
313 | scene.BordersLocked = true; | 304 | scene.BordersLocked = true; |
314 | conn.RegionScene.BordersLocked = true; | 305 | conn.RegionScene.BordersLocked = true; |
315 | 306 | ||
@@ -347,8 +338,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
347 | break; | 338 | break; |
348 | } | 339 | } |
349 | 340 | ||
350 | |||
351 | |||
352 | // If we're one region over x +y | 341 | // If we're one region over x +y |
353 | //xyx | 342 | //xyx |
354 | //xxx | 343 | //xxx |
@@ -369,7 +358,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
369 | extents.X = conn.XEnd; | 358 | extents.X = conn.XEnd; |
370 | conn.UpdateExtents(extents); | 359 | conn.UpdateExtents(extents); |
371 | 360 | ||
372 | |||
373 | scene.BordersLocked = true; | 361 | scene.BordersLocked = true; |
374 | conn.RegionScene.BordersLocked = true; | 362 | conn.RegionScene.BordersLocked = true; |
375 | 363 | ||
@@ -382,6 +370,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
382 | m_log.DebugFormat("Scene: {0} to the northeast of Scene{1} Offset: {2}. Extents:{3}", | 370 | m_log.DebugFormat("Scene: {0} to the northeast of Scene{1} Offset: {2}. Extents:{3}", |
383 | conn.RegionScene.RegionInfo.RegionName, | 371 | conn.RegionScene.RegionInfo.RegionName, |
384 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | 372 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); |
373 | |||
385 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); | 374 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); |
386 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); | 375 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); |
387 | 376 | ||
@@ -444,6 +433,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
444 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); | 433 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); |
445 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); | 434 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); |
446 | lock (conn.RegionScene.NorthBorders) | 435 | lock (conn.RegionScene.NorthBorders) |
436 | { | ||
447 | if (conn.RegionScene.NorthBorders.Count == 1)// && 2) | 437 | if (conn.RegionScene.NorthBorders.Count == 1)// && 2) |
448 | { | 438 | { |
449 | //compound border | 439 | //compound border |
@@ -454,14 +444,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
454 | conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize; | 444 | conn.RegionScene.EastBorders[0].BorderLine.Y += (int)Constants.RegionSize; |
455 | lock (conn.RegionScene.WestBorders) | 445 | lock (conn.RegionScene.WestBorders) |
456 | conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize; | 446 | conn.RegionScene.WestBorders[0].BorderLine.Y += (int)Constants.RegionSize; |
457 | |||
458 | |||
459 | |||
460 | } | 447 | } |
448 | } | ||
461 | lock (scene.SouthBorders) | 449 | lock (scene.SouthBorders) |
462 | scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south | 450 | scene.SouthBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport south |
463 | 451 | ||
464 | lock (conn.RegionScene.EastBorders) | 452 | lock (conn.RegionScene.EastBorders) |
453 | { | ||
465 | if (conn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2) | 454 | if (conn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2) |
466 | { | 455 | { |
467 | 456 | ||
@@ -473,7 +462,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
473 | 462 | ||
474 | 463 | ||
475 | } | 464 | } |
476 | 465 | } | |
466 | |||
477 | lock (scene.WestBorders) | 467 | lock (scene.WestBorders) |
478 | scene.WestBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport West | 468 | scene.WestBorders[0].BorderLine.Z += (int)Constants.RegionSize; //auto teleport West |
479 | /* | 469 | /* |
@@ -503,9 +493,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
503 | 493 | ||
504 | break; | 494 | break; |
505 | } | 495 | } |
506 | |||
507 | |||
508 | } | 496 | } |
497 | |||
509 | if (!connectedYN) | 498 | if (!connectedYN) |
510 | { | 499 | { |
511 | RegionData rdata = new RegionData(); | 500 | RegionData rdata = new RegionData(); |
@@ -528,9 +517,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
528 | regionConnections.ClientEventForwarder = new RegionCombinerClientEventForwarder(regionConnections); | 517 | regionConnections.ClientEventForwarder = new RegionCombinerClientEventForwarder(regionConnections); |
529 | scene.EventManager.OnNewPresence += SetCourseLocationDelegate; | 518 | scene.EventManager.OnNewPresence += SetCourseLocationDelegate; |
530 | m_regions.Add(scene.RegionInfo.originRegionID, regionConnections); | 519 | m_regions.Add(scene.RegionInfo.originRegionID, regionConnections); |
531 | |||
532 | } | 520 | } |
533 | |||
534 | } | 521 | } |
535 | AdjustLargeRegionBounds(); | 522 | AdjustLargeRegionBounds(); |
536 | } | 523 | } |
@@ -585,7 +572,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
585 | } | 572 | } |
586 | 573 | ||
587 | private void DistributeCourseLocationUpdates(List<Vector3> locations, List<UUID> uuids, | 574 | private void DistributeCourseLocationUpdates(List<Vector3> locations, List<UUID> uuids, |
588 | RegionConnections connectiondata, ScenePresence rootPresence) | 575 | RegionConnections connectiondata, ScenePresence rootPresence) |
589 | { | 576 | { |
590 | RegionData[] rdata = connectiondata.ConnectedRegions.ToArray(); | 577 | RegionData[] rdata = connectiondata.ConnectedRegions.ToArray(); |
591 | //List<IClientAPI> clients = new List<IClientAPI>(); | 578 | //List<IClientAPI> clients = new List<IClientAPI>(); |
@@ -621,7 +608,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
621 | } | 608 | } |
622 | 609 | ||
623 | // go over the locations and assign them to an IClientAPI | 610 | // go over the locations and assign them to an IClientAPI |
624 | for (int i = 0; i < locations.Count;i++ ) | 611 | for (int i = 0; i < locations.Count; i++) |
625 | //{locations[i]/(int) Constants.RegionSize; | 612 | //{locations[i]/(int) Constants.RegionSize; |
626 | { | 613 | { |
627 | Vector3 pPosition = new Vector3((int)locations[i].X / (int)Constants.RegionSize, | 614 | Vector3 pPosition = new Vector3((int)locations[i].X / (int)Constants.RegionSize, |
@@ -643,12 +630,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
643 | updatedata.UserAPI = LocateUsersChildAgentIClientAPI(offset, rootPresence.UUID, rdata); | 630 | updatedata.UserAPI = LocateUsersChildAgentIClientAPI(offset, rootPresence.UUID, rdata); |
644 | 631 | ||
645 | updates.Add(offset,updatedata); | 632 | updates.Add(offset,updatedata); |
646 | |||
647 | } | 633 | } |
648 | 634 | ||
649 | updates[offset].Locations.Add(locations[i]); | 635 | updates[offset].Locations.Add(locations[i]); |
650 | updates[offset].Uuids.Add(uuids[i]); | 636 | updates[offset].Uuids.Add(uuids[i]); |
651 | |||
652 | } | 637 | } |
653 | 638 | ||
654 | // Send out the CoarseLocationupdates from their respective client connection based on where the avatar is | 639 | // 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 | |||
659 | updates[offset].UserAPI.SendCoarseLocationUpdate(updates[offset].Uuids,updates[offset].Locations); | 644 | updates[offset].UserAPI.SendCoarseLocationUpdate(updates[offset].Uuids,updates[offset].Locations); |
660 | } | 645 | } |
661 | } | 646 | } |
662 | |||
663 | } | 647 | } |
664 | 648 | ||
665 | private IClientAPI LocateUsersChildAgentIClientAPI(Vector2 offset, UUID uUID, RegionData[] rdata) | 649 | private IClientAPI LocateUsersChildAgentIClientAPI(Vector2 offset, UUID uUID, RegionData[] rdata) |
@@ -678,11 +662,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
678 | 662 | ||
679 | public void PostInitialise() | 663 | public void PostInitialise() |
680 | { | 664 | { |
681 | |||
682 | } | 665 | } |
683 | 666 | ||
684 | |||
685 | |||
686 | public void UnCombineRegion(RegionData rdata) | 667 | public void UnCombineRegion(RegionData rdata) |
687 | { | 668 | { |
688 | lock (m_regions) | 669 | lock (m_regions) |
@@ -706,6 +687,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
706 | } | 687 | } |
707 | } | 688 | } |
708 | } | 689 | } |
690 | |||
709 | // Create a set of infinite borders around the whole aabb of the combined island. | 691 | // Create a set of infinite borders around the whole aabb of the combined island. |
710 | private void AdjustLargeRegionBounds() | 692 | private void AdjustLargeRegionBounds() |
711 | { | 693 | { |
@@ -719,12 +701,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
719 | { | 701 | { |
720 | if (rdata.Offset.X > offset.X) offset.X = rdata.Offset.X; | 702 | if (rdata.Offset.X > offset.X) offset.X = rdata.Offset.X; |
721 | if (rdata.Offset.Y > offset.Y) offset.Y = rdata.Offset.Y; | 703 | if (rdata.Offset.Y > offset.Y) offset.Y = rdata.Offset.Y; |
722 | |||
723 | } | 704 | } |
724 | 705 | ||
725 | lock (rconn.RegionScene.NorthBorders) | 706 | lock (rconn.RegionScene.NorthBorders) |
726 | { | 707 | { |
727 | |||
728 | Border northBorder = null; | 708 | Border northBorder = null; |
729 | 709 | ||
730 | if (!TryGetInfiniteBorder(rconn.RegionScene.NorthBorders, out northBorder)) | 710 | if (!TryGetInfiniteBorder(rconn.RegionScene.NorthBorders, out northBorder)) |
@@ -736,7 +716,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
736 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, | 716 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, |
737 | offset.Y + (int) Constants.RegionSize); //<--- | 717 | offset.Y + (int) Constants.RegionSize); //<--- |
738 | northBorder.CrossDirection = Cardinals.N; | 718 | northBorder.CrossDirection = Cardinals.N; |
739 | |||
740 | } | 719 | } |
741 | 720 | ||
742 | lock (rconn.RegionScene.SouthBorders) | 721 | lock (rconn.RegionScene.SouthBorders) |
@@ -749,7 +728,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
749 | } | 728 | } |
750 | southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //---> | 729 | southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //---> |
751 | southBorder.CrossDirection = Cardinals.S; | 730 | southBorder.CrossDirection = Cardinals.S; |
752 | |||
753 | } | 731 | } |
754 | 732 | ||
755 | lock (rconn.RegionScene.EastBorders) | 733 | lock (rconn.RegionScene.EastBorders) |
@@ -763,7 +741,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
763 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.X + (int)Constants.RegionSize); | 741 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.X + (int)Constants.RegionSize); |
764 | //<--- | 742 | //<--- |
765 | eastBorder.CrossDirection = Cardinals.E; | 743 | eastBorder.CrossDirection = Cardinals.E; |
766 | |||
767 | } | 744 | } |
768 | 745 | ||
769 | lock (rconn.RegionScene.WestBorders) | 746 | lock (rconn.RegionScene.WestBorders) |
@@ -777,11 +754,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
777 | } | 754 | } |
778 | westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //---> | 755 | westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //---> |
779 | westBorder.CrossDirection = Cardinals.W; | 756 | westBorder.CrossDirection = Cardinals.W; |
780 | |||
781 | } | 757 | } |
782 | 758 | ||
783 | |||
784 | |||
785 | rconn.RegionScene.BordersLocked = false; | 759 | rconn.RegionScene.BordersLocked = false; |
786 | } | 760 | } |
787 | } | 761 | } |
@@ -823,8 +797,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
823 | if (BigRegion.PermissionModule == null) | 797 | if (BigRegion.PermissionModule == null) |
824 | BigRegion.PermissionModule = new RegionCombinerPermissionModule(BigRegion.RegionScene); | 798 | BigRegion.PermissionModule = new RegionCombinerPermissionModule(BigRegion.RegionScene); |
825 | 799 | ||
826 | |||
827 | |||
828 | VirtualRegion.Permissions.OnBypassPermissions += BigRegion.PermissionModule.BypassPermissions; | 800 | VirtualRegion.Permissions.OnBypassPermissions += BigRegion.PermissionModule.BypassPermissions; |
829 | VirtualRegion.Permissions.OnSetBypassPermissions += BigRegion.PermissionModule.SetBypassPermissions; | 801 | VirtualRegion.Permissions.OnSetBypassPermissions += BigRegion.PermissionModule.SetBypassPermissions; |
830 | VirtualRegion.Permissions.OnPropagatePermissions += BigRegion.PermissionModule.PropagatePermissions; | 802 | VirtualRegion.Permissions.OnPropagatePermissions += BigRegion.PermissionModule.PropagatePermissions; |
@@ -855,27 +827,24 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
855 | VirtualRegion.Permissions.OnLinkObject += BigRegion.PermissionModule.CanLinkObject; //NOT YET IMPLEMENTED | 827 | VirtualRegion.Permissions.OnLinkObject += BigRegion.PermissionModule.CanLinkObject; //NOT YET IMPLEMENTED |
856 | VirtualRegion.Permissions.OnDelinkObject += BigRegion.PermissionModule.CanDelinkObject; //NOT YET IMPLEMENTED | 828 | VirtualRegion.Permissions.OnDelinkObject += BigRegion.PermissionModule.CanDelinkObject; //NOT YET IMPLEMENTED |
857 | VirtualRegion.Permissions.OnBuyLand += BigRegion.PermissionModule.CanBuyLand; //NOT YET IMPLEMENTED | 829 | VirtualRegion.Permissions.OnBuyLand += BigRegion.PermissionModule.CanBuyLand; //NOT YET IMPLEMENTED |
858 | |||
859 | VirtualRegion.Permissions.OnViewNotecard += BigRegion.PermissionModule.CanViewNotecard; //NOT YET IMPLEMENTED | 830 | VirtualRegion.Permissions.OnViewNotecard += BigRegion.PermissionModule.CanViewNotecard; //NOT YET IMPLEMENTED |
860 | VirtualRegion.Permissions.OnViewScript += BigRegion.PermissionModule.CanViewScript; //NOT YET IMPLEMENTED | 831 | VirtualRegion.Permissions.OnViewScript += BigRegion.PermissionModule.CanViewScript; //NOT YET IMPLEMENTED |
861 | VirtualRegion.Permissions.OnEditNotecard += BigRegion.PermissionModule.CanEditNotecard; //NOT YET IMPLEMENTED | 832 | VirtualRegion.Permissions.OnEditNotecard += BigRegion.PermissionModule.CanEditNotecard; //NOT YET IMPLEMENTED |
862 | VirtualRegion.Permissions.OnEditScript += BigRegion.PermissionModule.CanEditScript; //NOT YET IMPLEMENTED | 833 | VirtualRegion.Permissions.OnEditScript += BigRegion.PermissionModule.CanEditScript; //NOT YET IMPLEMENTED |
863 | |||
864 | VirtualRegion.Permissions.OnCreateObjectInventory += BigRegion.PermissionModule.CanCreateObjectInventory; //NOT IMPLEMENTED HERE | 834 | VirtualRegion.Permissions.OnCreateObjectInventory += BigRegion.PermissionModule.CanCreateObjectInventory; //NOT IMPLEMENTED HERE |
865 | VirtualRegion.Permissions.OnEditObjectInventory += BigRegion.PermissionModule.CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED | 835 | VirtualRegion.Permissions.OnEditObjectInventory += BigRegion.PermissionModule.CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED |
866 | VirtualRegion.Permissions.OnCopyObjectInventory += BigRegion.PermissionModule.CanCopyObjectInventory; //NOT YET IMPLEMENTED | 836 | VirtualRegion.Permissions.OnCopyObjectInventory += BigRegion.PermissionModule.CanCopyObjectInventory; //NOT YET IMPLEMENTED |
867 | VirtualRegion.Permissions.OnDeleteObjectInventory += BigRegion.PermissionModule.CanDeleteObjectInventory; //NOT YET IMPLEMENTED | 837 | VirtualRegion.Permissions.OnDeleteObjectInventory += BigRegion.PermissionModule.CanDeleteObjectInventory; //NOT YET IMPLEMENTED |
868 | VirtualRegion.Permissions.OnResetScript += BigRegion.PermissionModule.CanResetScript; | 838 | VirtualRegion.Permissions.OnResetScript += BigRegion.PermissionModule.CanResetScript; |
869 | |||
870 | VirtualRegion.Permissions.OnCreateUserInventory += BigRegion.PermissionModule.CanCreateUserInventory; //NOT YET IMPLEMENTED | 839 | VirtualRegion.Permissions.OnCreateUserInventory += BigRegion.PermissionModule.CanCreateUserInventory; //NOT YET IMPLEMENTED |
871 | VirtualRegion.Permissions.OnCopyUserInventory += BigRegion.PermissionModule.CanCopyUserInventory; //NOT YET IMPLEMENTED | 840 | VirtualRegion.Permissions.OnCopyUserInventory += BigRegion.PermissionModule.CanCopyUserInventory; //NOT YET IMPLEMENTED |
872 | VirtualRegion.Permissions.OnEditUserInventory += BigRegion.PermissionModule.CanEditUserInventory; //NOT YET IMPLEMENTED | 841 | VirtualRegion.Permissions.OnEditUserInventory += BigRegion.PermissionModule.CanEditUserInventory; //NOT YET IMPLEMENTED |
873 | VirtualRegion.Permissions.OnDeleteUserInventory += BigRegion.PermissionModule.CanDeleteUserInventory; //NOT YET IMPLEMENTED | 842 | VirtualRegion.Permissions.OnDeleteUserInventory += BigRegion.PermissionModule.CanDeleteUserInventory; //NOT YET IMPLEMENTED |
874 | |||
875 | VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED | 843 | VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED |
876 | VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED | 844 | VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED |
877 | } | 845 | } |
878 | } | 846 | } |
847 | |||
879 | public class RegionConnections | 848 | public class RegionConnections |
880 | { | 849 | { |
881 | public UUID RegionId; | 850 | public UUID RegionId; |
@@ -893,7 +862,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
893 | XEnd = (int)extents.X; | 862 | XEnd = (int)extents.X; |
894 | YEnd = (int)extents.Y; | 863 | YEnd = (int)extents.Y; |
895 | } | 864 | } |
896 | |||
897 | } | 865 | } |
898 | 866 | ||
899 | public class RegionData | 867 | public class RegionData |
@@ -901,8 +869,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
901 | public UUID RegionId; | 869 | public UUID RegionId; |
902 | public Scene RegionScene; | 870 | public Scene RegionScene; |
903 | public Vector3 Offset; | 871 | public Vector3 Offset; |
904 | |||
905 | } | 872 | } |
873 | |||
906 | struct RegionCourseLocationStruct | 874 | struct RegionCourseLocationStruct |
907 | { | 875 | { |
908 | public List<Vector3> Locations; | 876 | public List<Vector3> Locations; |
@@ -922,7 +890,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
922 | #region ILandChannel Members | 890 | #region ILandChannel Members |
923 | 891 | ||
924 | public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel, | 892 | public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel, |
925 | List<RegionData> regionConnections) | 893 | List<RegionData> regionConnections) |
926 | { | 894 | { |
927 | RegData = regData; | 895 | RegData = regData; |
928 | RootRegionLandChannel = rootRegionLandChannel; | 896 | RootRegionLandChannel = rootRegionLandChannel; |
@@ -937,9 +905,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
937 | 905 | ||
938 | public List<ILandObject> AllParcels() | 906 | public List<ILandObject> AllParcels() |
939 | { | 907 | { |
940 | |||
941 | return RootRegionLandChannel.AllParcels(); | 908 | return RootRegionLandChannel.AllParcels(); |
942 | |||
943 | } | 909 | } |
944 | 910 | ||
945 | public ILandObject GetLandObject(int x, int y) | 911 | public ILandObject GetLandObject(int x, int y) |
@@ -1044,12 +1010,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1044 | public class RegionCombinerPermissionModule | 1010 | public class RegionCombinerPermissionModule |
1045 | { | 1011 | { |
1046 | private Scene m_rootScene; | 1012 | private Scene m_rootScene; |
1013 | |||
1047 | public RegionCombinerPermissionModule(Scene RootScene) | 1014 | public RegionCombinerPermissionModule(Scene RootScene) |
1048 | { | 1015 | { |
1049 | m_rootScene = RootScene; | 1016 | m_rootScene = RootScene; |
1050 | } | 1017 | } |
1051 | 1018 | ||
1052 | #region Permission Override | 1019 | #region Permission Override |
1020 | |||
1053 | public bool BypassPermissions() | 1021 | public bool BypassPermissions() |
1054 | { | 1022 | { |
1055 | return m_rootScene.Permissions.BypassPermissions(); | 1023 | return m_rootScene.Permissions.BypassPermissions(); |
@@ -1274,6 +1242,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1274 | { | 1242 | { |
1275 | return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist); | 1243 | return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist); |
1276 | } | 1244 | } |
1245 | |||
1277 | #endregion | 1246 | #endregion |
1278 | } | 1247 | } |
1279 | 1248 | ||
@@ -1283,14 +1252,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1283 | private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>(); | 1252 | private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>(); |
1284 | private Dictionary<UUID,RegionCombinerModuleIndividualForwarder> m_forwarders = new Dictionary<UUID, | 1253 | private Dictionary<UUID,RegionCombinerModuleIndividualForwarder> m_forwarders = new Dictionary<UUID, |
1285 | RegionCombinerModuleIndividualForwarder>(); | 1254 | RegionCombinerModuleIndividualForwarder>(); |
1255 | |||
1286 | public RegionCombinerClientEventForwarder(RegionConnections rootScene) | 1256 | public RegionCombinerClientEventForwarder(RegionConnections rootScene) |
1287 | { | 1257 | { |
1288 | m_rootScene = rootScene.RegionScene; | 1258 | m_rootScene = rootScene.RegionScene; |
1289 | |||
1290 | |||
1291 | } | 1259 | } |
1292 | 1260 | ||
1293 | public void AddSceneToEventForwarding( Scene virtualScene ) | 1261 | public void AddSceneToEventForwarding(Scene virtualScene) |
1294 | { | 1262 | { |
1295 | lock (m_virtScene) | 1263 | lock (m_virtScene) |
1296 | { | 1264 | { |
@@ -1342,6 +1310,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1342 | { | 1310 | { |
1343 | private Scene m_rootScene; | 1311 | private Scene m_rootScene; |
1344 | private Scene m_virtScene; | 1312 | private Scene m_virtScene; |
1313 | |||
1345 | public RegionCombinerModuleIndividualForwarder(Scene rootScene, Scene virtScene) | 1314 | public RegionCombinerModuleIndividualForwarder(Scene rootScene, Scene virtScene) |
1346 | { | 1315 | { |
1347 | m_rootScene = rootScene; | 1316 | m_rootScene = rootScene; |
@@ -1350,7 +1319,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1350 | 1319 | ||
1351 | public void ClientConnect(IClientAPI client) | 1320 | public void ClientConnect(IClientAPI client) |
1352 | { | 1321 | { |
1353 | |||
1354 | m_virtScene.UnSubscribeToClientPrimEvents(client); | 1322 | m_virtScene.UnSubscribeToClientPrimEvents(client); |
1355 | m_virtScene.UnSubscribeToClientPrimRezEvents(client); | 1323 | m_virtScene.UnSubscribeToClientPrimRezEvents(client); |
1356 | m_virtScene.UnSubscribeToClientInventoryEvents(client); | 1324 | m_virtScene.UnSubscribeToClientInventoryEvents(client); |
@@ -1370,12 +1338,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1370 | m_rootScene.SubscribeToClientGodEvents(client); | 1338 | m_rootScene.SubscribeToClientGodEvents(client); |
1371 | m_rootScene.SubscribeToClientNetworkEvents(client); | 1339 | m_rootScene.SubscribeToClientNetworkEvents(client); |
1372 | } | 1340 | } |
1341 | |||
1373 | public void ClientClosed(UUID clientid, Scene scene) | 1342 | public void ClientClosed(UUID clientid, Scene scene) |
1374 | { | 1343 | { |
1375 | |||
1376 | } | 1344 | } |
1377 | 1345 | ||
1378 | |||
1379 | private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart, | 1346 | private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart, |
1380 | UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem, | 1347 | UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem, |
1381 | UUID fromtaskid) | 1348 | UUID fromtaskid) |
@@ -1389,7 +1356,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1389 | 1356 | ||
1390 | m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast, | 1357 | m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast, |
1391 | rayendisintersection, rezselected, removeitem, fromtaskid); | 1358 | rayendisintersection, rezselected, removeitem, fromtaskid); |
1392 | |||
1393 | } | 1359 | } |
1394 | 1360 | ||
1395 | private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot, | 1361 | private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot, |
@@ -1404,7 +1370,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1404 | raystart.Y += differenceY * (int)Constants.RegionSize; | 1370 | raystart.Y += differenceY * (int)Constants.RegionSize; |
1405 | m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid, | 1371 | m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid, |
1406 | rayendisintersection); | 1372 | rayendisintersection); |
1407 | |||
1408 | } | 1373 | } |
1409 | } | 1374 | } |
1410 | } | 1375 | } |
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 | |||
78 | bool permissionToDelete) | 78 | bool permissionToDelete) |
79 | { | 79 | { |
80 | if (Enabled) | 80 | if (Enabled) |
81 | m_inventoryTicker.Stop(); | 81 | lock (m_inventoryTicker) |
82 | m_inventoryTicker.Stop(); | ||
82 | 83 | ||
83 | lock (m_inventoryDeletes) | 84 | lock (m_inventoryDeletes) |
84 | { | 85 | { |
@@ -93,7 +94,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
93 | } | 94 | } |
94 | 95 | ||
95 | if (Enabled) | 96 | if (Enabled) |
96 | m_inventoryTicker.Start(); | 97 | lock (m_inventoryTicker) |
98 | m_inventoryTicker.Start(); | ||
97 | 99 | ||
98 | // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object | 100 | // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object |
99 | // has gone to inventory, it will reappear in the region again on restart instead of being lost. | 101 | // has gone to inventory, it will reappear in the region again on restart instead of being lost. |
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 | |||
443 | int startX = (int) pRegionLocX - 1; | 443 | int startX = (int) pRegionLocX - 1; |
444 | int startY = (int) pRegionLocY - 1; | 444 | int startY = (int) pRegionLocY - 1; |
445 | 445 | ||
446 | int endX = (int) pRegionLocX + (int)extent.X + 1; | 446 | int endX = (int) pRegionLocX + (int)extent.X; |
447 | int endY = (int) pRegionLocY + (int)extent.Y + 1; | 447 | int endY = (int) pRegionLocY + (int)extent.Y; |
448 | 448 | ||
449 | for (int i=startX;i<endX;i++) | 449 | for (int i=startX;i<endX;i++) |
450 | { | 450 | { |
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) { | |||
3762 | lPos = AbsolutePosition; | 3762 | lPos = AbsolutePosition; |
3763 | } | 3763 | } |
3764 | 3764 | ||
3765 | // Causes this thread to dig into the Client Thread Data. | ||
3766 | // Remember your locking here! | ||
3765 | remoteClient.SendPrimTerseUpdate(m_regionHandle, | 3767 | remoteClient.SendPrimTerseUpdate(m_regionHandle, |
3766 | (ushort)(m_parentGroup.GetTimeDilation() * | 3768 | (ushort)(m_parentGroup.GetTimeDilation() * |
3767 | (float)ushort.MaxValue), LocalId, lPos, | 3769 | (float)ushort.MaxValue), LocalId, lPos, |