aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2009-09-02 16:29:50 +0100
committerMelanie2009-09-02 16:29:50 +0100
commit8e7b385883a2d9e590490c2d28cd2dbe2a7c5d95 (patch)
treeaa5824b7839df1471077b276bf0cb89c13369805 /OpenSim
parentCorrect the icons on wearables in agent inventory. To fully correct the issue (diff)
parentswitching LandManagementModule to "new" region module scheme; cleaning (diff)
downloadopensim-SC_OLD-8e7b385883a2d9e590490c2d28cd2dbe2a7c5d95.zip
opensim-SC_OLD-8e7b385883a2d9e590490c2d28cd2dbe2a7c5d95.tar.gz
opensim-SC_OLD-8e7b385883a2d9e590490c2d28cd2dbe2a7c5d95.tar.bz2
opensim-SC_OLD-8e7b385883a2d9e590490c2d28cd2dbe2a7c5d95.tar.xz
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs7
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml1
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs163
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs27
-rw-r--r--OpenSim/Region/Framework/Scenes/Border.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs36
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs4
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs5
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs73
-rw-r--r--OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs10
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs2
15 files changed, 234 insertions, 110 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
index 2bb0926..e5d8895 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Communications.Tests
66 CachedUserInfo nonExistingUserInfo; 66 CachedUserInfo nonExistingUserInfo;
67 67
68 TestCommunicationsManager commsManager = new TestCommunicationsManager(); 68 TestCommunicationsManager commsManager = new TestCommunicationsManager();
69 Scene myScene = SceneSetupHelpers.SetupScene(commsManager, ""); 69 // Scene myScene = SceneSetupHelpers.SetupScene(commsManager, "");
70 70
71 // Check we can't retrieve info before it exists by uuid 71 // Check we can't retrieve info before it exists by uuid
72 nonExistingUserInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); 72 nonExistingUserInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 1696d82..066c5d3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -93,13 +93,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
93 string userFirstName = "Jock"; 93 string userFirstName = "Jock";
94 string userLastName = "Stirrup"; 94 string userLastName = "Stirrup";
95 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 95 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
96 CachedUserInfo userInfo; 96 // CachedUserInfo userInfo;
97 97
98 lock (this) 98 lock (this)
99 { 99 {
100 userInfo 100 UserProfileTestUtils.CreateUserWithInventory(
101 = UserProfileTestUtils.CreateUserWithInventory( 101 cm, userFirstName, userLastName, userId, InventoryReceived);
102 cm, userFirstName, userLastName, userId, InventoryReceived);
103 Monitor.Wait(this, 60000); 102 Monitor.Wait(this, 60000);
104 } 103 }
105 104
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index c882146..0de5215 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -8,6 +8,7 @@
8 </Dependencies> 8 </Dependencies>
9 9
10 <Extension path = "/OpenSim/RegionModules"> 10 <Extension path = "/OpenSim/RegionModules">
11 <RegionModule id="LandManagementModule" type="OpenSim.Region.CoreModules.World.Land.LandManagementModule" />
11 <RegionModule id="ExportSerialisationModule" type="OpenSim.Region.CoreModules.World.Serialiser.SerialiserModule" /> 12 <RegionModule id="ExportSerialisationModule" type="OpenSim.Region.CoreModules.World.Serialiser.SerialiserModule" />
12 <RegionModule id="ArchiverModule" type="OpenSim.Region.CoreModules.World.Archiver.ArchiverModule" /> 13 <RegionModule id="ArchiverModule" type="OpenSim.Region.CoreModules.World.Archiver.ArchiverModule" />
13 <RegionModule id="CapabilitiesModule" type="OpenSim.Region.CoreModules.Agent.Capabilities.CapabilitiesModule" /> 14 <RegionModule id="CapabilitiesModule" type="OpenSim.Region.CoreModules.Agent.Capabilities.CapabilitiesModule" />
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 5c2e136..76ff6da 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Land
50 public uint x, y; 50 public uint x, y;
51 } 51 }
52 52
53 public class LandManagementModule : IRegionModule 53 public class LandManagementModule : INonSharedRegionModule
54 { 54 {
55 private static readonly ILog m_log = 55 private static readonly ILog m_log =
56 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -61,7 +61,9 @@ namespace OpenSim.Region.CoreModules.World.Land
61 private Scene m_scene; 61 private Scene m_scene;
62 62
63 // Minimum for parcels to work is 64m even if we don't actually use them. 63 // Minimum for parcels to work is 64m even if we don't actually use them.
64 #pragma warning disable 0429
64 private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; 65 private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64;
66 #pragma warning restore 0429
65 67
66 private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; 68 private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
67 private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); 69 private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
@@ -74,9 +76,18 @@ namespace OpenSim.Region.CoreModules.World.Land
74 // caches ExtendedLandData 76 // caches ExtendedLandData
75 private Cache parcelInfoCache; 77 private Cache parcelInfoCache;
76 78
77 #region IRegionModule Members 79 #region INonSharedRegionModule Members
78 80
79 public void Initialise(Scene scene, IConfigSource source) 81 public Type ReplaceableInterface
82 {
83 get { return null; }
84 }
85
86 public void Initialise(IConfigSource source)
87 {
88 }
89
90 public void AddRegion(Scene scene)
80 { 91 {
81 m_scene = scene; 92 m_scene = scene;
82 m_landIDList.Initialize(); 93 m_landIDList.Initialize();
@@ -86,22 +97,21 @@ namespace OpenSim.Region.CoreModules.World.Land
86 parcelInfoCache.Size = 30; // the number of different parcel requests in this region to cache 97 parcelInfoCache.Size = 30; // the number of different parcel requests in this region to cache
87 parcelInfoCache.DefaultTTL = new TimeSpan(0, 5, 0); 98 parcelInfoCache.DefaultTTL = new TimeSpan(0, 5, 0);
88 99
89 m_scene.EventManager.OnParcelPrimCountAdd += AddPrimToLandPrimCounts; 100 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd;
90 m_scene.EventManager.OnParcelPrimCountUpdate += UpdateLandPrimCounts; 101 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate;
91 m_scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel); 102 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel;
92 m_scene.EventManager.OnClientMovement += new EventManager.ClientMovement(handleAnyClientMovement); 103 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement;
93 m_scene.EventManager.OnValidateLandBuy += handleLandValidationRequest; 104 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
94 m_scene.EventManager.OnLandBuy += handleLandBuyRequest; 105 m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy;
95 m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient); 106 m_scene.EventManager.OnNewClient += EventManagerOnNewClient;
96 m_scene.EventManager.OnSignificantClientMovement += handleSignificantClientMovement; 107 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
97 m_scene.EventManager.OnObjectBeingRemovedFromScene += RemovePrimFromLandPrimCounts; 108 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
98 109 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
99 m_scene.EventManager.OnNoticeNoLandDataFromStorage += this.NoLandDataFromStorage; 110 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
100 m_scene.EventManager.OnIncomingLandDataFromStorage += this.IncomingLandObjectsFromStorage; 111 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
101 m_scene.EventManager.OnSetAllowForcefulBan += this.SetAllowedForcefulBans; 112 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
102 m_scene.EventManager.OnRequestParcelPrimCountUpdate += this.PerformParcelPrimCountUpdate; 113 m_scene.EventManager.OnParcelPrimCountTainted += EventManagerOnParcelPrimCountTainted;
103 m_scene.EventManager.OnParcelPrimCountTainted += this.SetPrimsTainted; 114 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
104 m_scene.EventManager.OnRegisterCaps += this.OnRegisterCaps;
105 115
106 lock (m_scene) 116 lock (m_scene)
107 { 117 {
@@ -109,24 +119,31 @@ namespace OpenSim.Region.CoreModules.World.Land
109 } 119 }
110 } 120 }
111 121
112 void EventManager_OnNewClient(IClientAPI client) 122 public void RegionLoaded(Scene scene)
123 {
124 }
125
126 public void RemoveRegion(Scene scene)
127 {
128 }
129
130 void EventManagerOnNewClient(IClientAPI client)
113 { 131 {
114 //Register some client events 132 //Register some client events
115 client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(handleParcelPropertiesRequest); 133 client.OnParcelPropertiesRequest += ClientOnParcelPropertiesRequest;
116 client.OnParcelDivideRequest += new ParcelDivideRequest(handleParcelDivideRequest); 134 client.OnParcelDivideRequest += ClientOnParcelDivideRequest;
117 client.OnParcelJoinRequest += new ParcelJoinRequest(handleParcelJoinRequest); 135 client.OnParcelJoinRequest += ClientOnParcelJoinRequest;
118 client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(handleParcelPropertiesUpdateRequest); 136 client.OnParcelPropertiesUpdateRequest += ClientOnParcelPropertiesUpdateRequest;
119 client.OnParcelSelectObjects += new ParcelSelectObjects(handleParcelSelectObjectsRequest); 137 client.OnParcelSelectObjects += ClientOnParcelSelectObjects;
120 client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(handleParcelObjectOwnersRequest); 138 client.OnParcelObjectOwnerRequest += ClientOnParcelObjectOwnerRequest;
121 client.OnParcelAccessListRequest += new ParcelAccessListRequest(handleParcelAccessRequest); 139 client.OnParcelAccessListRequest += ClientOnParcelAccessListRequest;
122 client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(handleParcelAccessUpdateRequest); 140 client.OnParcelAccessListUpdateRequest += ClientOnParcelAccessUpdateListRequest;
123 client.OnParcelAbandonRequest += new ParcelAbandonRequest(handleParcelAbandonRequest); 141 client.OnParcelAbandonRequest += ClientOnParcelAbandonRequest;
124 client.OnParcelGodForceOwner += new ParcelGodForceOwner(handleParcelGodForceOwner); 142 client.OnParcelGodForceOwner += ClientOnParcelGodForceOwner;
125 client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim); 143 client.OnParcelReclaim += ClientOnParcelReclaim;
126 client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo); 144 client.OnParcelInfoRequest += ClientOnParcelInfoRequest;
127 client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell); 145 client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
128 146 client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup;
129 client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup);
130 147
131 if (m_scene.Entities.ContainsKey(client.AgentId)) 148 if (m_scene.Entities.ContainsKey(client.AgentId))
132 { 149 {
@@ -158,7 +175,7 @@ namespace OpenSim.Region.CoreModules.World.Land
158 175
159 #region Parcel Add/Remove/Get/Create 176 #region Parcel Add/Remove/Get/Create
160 177
161 public void SetAllowedForcefulBans(bool forceful) 178 public void EventManagerOnSetAllowedForcefulBan(bool forceful)
162 { 179 {
163 AllowedForcefulBans = forceful; 180 AllowedForcefulBans = forceful;
164 } 181 }
@@ -256,7 +273,7 @@ namespace OpenSim.Region.CoreModules.World.Land
256 } 273 }
257 } 274 }
258 275
259 public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID) 276 public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
260 { 277 {
261 if (m_scene.RegionInfo.RegionID == regionID) 278 if (m_scene.RegionInfo.RegionID == regionID)
262 { 279 {
@@ -353,7 +370,7 @@ namespace OpenSim.Region.CoreModules.World.Land
353 SendLandUpdate(avatar, false); 370 SendLandUpdate(avatar, false);
354 } 371 }
355 372
356 public void handleSignificantClientMovement(IClientAPI remote_client) 373 public void EventManagerOnSignificantClientMovement(IClientAPI remote_client)
357 { 374 {
358 ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); 375 ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId);
359 376
@@ -367,8 +384,9 @@ namespace OpenSim.Region.CoreModules.World.Land
367 if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && 384 if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
368 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) 385 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
369 { 386 {
370 handleAvatarChangingParcel(clientAvatar, parcel.landData.LocalID, m_scene.RegionInfo.RegionID); 387 EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.landData.LocalID,
371 //They are going below the safety line! 388 m_scene.RegionInfo.RegionID);
389 //They are going under the safety line!
372 if (!parcel.isBannedFromLand(clientAvatar.UUID)) 390 if (!parcel.isBannedFromLand(clientAvatar.UUID))
373 { 391 {
374 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; 392 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
@@ -383,8 +401,8 @@ namespace OpenSim.Region.CoreModules.World.Land
383 } 401 }
384 } 402 }
385 403
386 public void handleAnyClientMovement(ScenePresence avatar) 404 public void EventManagerOnClientMovement(ScenePresence avatar)
387 //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance. 405 //Like handleEventManagerOnSignificantClientMovement, but called with an AgentUpdate regardless of distance.
388 { 406 {
389 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 407 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
390 if (over != null) 408 if (over != null)
@@ -398,8 +416,8 @@ namespace OpenSim.Region.CoreModules.World.Land
398 } 416 }
399 417
400 418
401 public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID, 419 public void ClientOnParcelAccessListRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
402 int landLocalID, IClientAPI remote_client) 420 int landLocalID, IClientAPI remote_client)
403 { 421 {
404 ILandObject land; 422 ILandObject land;
405 lock (m_landList) 423 lock (m_landList)
@@ -413,9 +431,9 @@ namespace OpenSim.Region.CoreModules.World.Land
413 } 431 }
414 } 432 }
415 433
416 public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID, 434 public void ClientOnParcelAccessUpdateListRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
417 List<ParcelManager.ParcelAccessEntry> entries, 435 List<ParcelManager.ParcelAccessEntry> entries,
418 IClientAPI remote_client) 436 IClientAPI remote_client)
419 { 437 {
420 ILandObject land; 438 ILandObject land;
421 lock (m_landList) 439 lock (m_landList)
@@ -615,7 +633,7 @@ namespace OpenSim.Region.CoreModules.World.Land
615 } 633 }
616 } 634 }
617 635
618 public void SetPrimsTainted() 636 public void EventManagerOnParcelPrimCountTainted()
619 { 637 {
620 m_landPrimCountTainted = true; 638 m_landPrimCountTainted = true;
621 } 639 }
@@ -625,7 +643,7 @@ namespace OpenSim.Region.CoreModules.World.Land
625 return m_landPrimCountTainted; 643 return m_landPrimCountTainted;
626 } 644 }
627 645
628 public void AddPrimToLandPrimCounts(SceneObjectGroup obj) 646 public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj)
629 { 647 {
630 Vector3 position = obj.AbsolutePosition; 648 Vector3 position = obj.AbsolutePosition;
631 ILandObject landUnderPrim = GetLandObject(position.X, position.Y); 649 ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
@@ -635,7 +653,7 @@ namespace OpenSim.Region.CoreModules.World.Land
635 } 653 }
636 } 654 }
637 655
638 public void RemovePrimFromLandPrimCounts(SceneObjectGroup obj) 656 public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
639 { 657 {
640 658
641 lock (m_landList) 659 lock (m_landList)
@@ -687,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Land
687 } 705 }
688 } 706 }
689 707
690 public void UpdateLandPrimCounts() 708 public void EventManagerOnParcelPrimCountUpdate()
691 { 709 {
692 ResetAllLandPrimCounts(); 710 ResetAllLandPrimCounts();
693 foreach (EntityBase obj in m_scene.Entities) 711 foreach (EntityBase obj in m_scene.Entities)
@@ -704,7 +722,7 @@ namespace OpenSim.Region.CoreModules.World.Land
704 m_landPrimCountTainted = false; 722 m_landPrimCountTainted = false;
705 } 723 }
706 724
707 public void PerformParcelPrimCountUpdate() 725 public void EventManagerOnRequestParcelPrimCountUpdate()
708 { 726 {
709 ResetAllLandPrimCounts(); 727 ResetAllLandPrimCounts();
710 m_scene.EventManager.TriggerParcelPrimCountUpdate(); 728 m_scene.EventManager.TriggerParcelPrimCountUpdate();
@@ -773,7 +791,7 @@ namespace OpenSim.Region.CoreModules.World.Land
773 m_landList[startLandObjectIndex].forceUpdateLandInfo(); 791 m_landList[startLandObjectIndex].forceUpdateLandInfo();
774 } 792 }
775 793
776 SetPrimsTainted(); 794 EventManagerOnParcelPrimCountTainted();
777 795
778 //Now add the new land object 796 //Now add the new land object
779 ILandObject result = AddLandObject(newLand); 797 ILandObject result = AddLandObject(newLand);
@@ -841,7 +859,7 @@ namespace OpenSim.Region.CoreModules.World.Land
841 performFinalLandJoin(masterLandObject, slaveLandObject); 859 performFinalLandJoin(masterLandObject, slaveLandObject);
842 } 860 }
843 } 861 }
844 SetPrimsTainted(); 862 EventManagerOnParcelPrimCountTainted();
845 863
846 masterLandObject.sendLandUpdateToAvatarsOverMe(); 864 masterLandObject.sendLandUpdateToAvatarsOverMe();
847 } 865 }
@@ -942,8 +960,8 @@ namespace OpenSim.Region.CoreModules.World.Land
942 } 960 }
943 } 961 }
944 962
945 public void handleParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, 963 public void ClientOnParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id,
946 bool snap_selection, IClientAPI remote_client) 964 bool snap_selection, IClientAPI remote_client)
947 { 965 {
948 //Get the land objects within the bounds 966 //Get the land objects within the bounds
949 List<ILandObject> temp = new List<ILandObject>(); 967 List<ILandObject> temp = new List<ILandObject>();
@@ -982,7 +1000,7 @@ namespace OpenSim.Region.CoreModules.World.Land
982 SendParcelOverlay(remote_client); 1000 SendParcelOverlay(remote_client);
983 } 1001 }
984 1002
985 public void handleParcelPropertiesUpdateRequest(LandUpdateArgs args, int localID, IClientAPI remote_client) 1003 public void ClientOnParcelPropertiesUpdateRequest(LandUpdateArgs args, int localID, IClientAPI remote_client)
986 { 1004 {
987 ILandObject land; 1005 ILandObject land;
988 lock (m_landList) 1006 lock (m_landList)
@@ -993,22 +1011,23 @@ namespace OpenSim.Region.CoreModules.World.Land
993 if (land != null) land.updateLandProperties(args, remote_client); 1011 if (land != null) land.updateLandProperties(args, remote_client);
994 } 1012 }
995 1013
996 public void handleParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client) 1014 public void ClientOnParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
997 { 1015 {
998 subdivide(west, south, east, north, remote_client.AgentId); 1016 subdivide(west, south, east, north, remote_client.AgentId);
999 } 1017 }
1000 1018
1001 public void handleParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client) 1019 public void ClientOnParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client)
1002 { 1020 {
1003 join(west, south, east, north, remote_client.AgentId); 1021 join(west, south, east, north, remote_client.AgentId);
1004 } 1022 }
1005 1023
1006 public void handleParcelSelectObjectsRequest(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) 1024 public void ClientOnParcelSelectObjects(int local_id, int request_type,
1025 List<UUID> returnIDs, IClientAPI remote_client)
1007 { 1026 {
1008 m_landList[local_id].sendForceObjectSelect(local_id, request_type, returnIDs, remote_client); 1027 m_landList[local_id].sendForceObjectSelect(local_id, request_type, returnIDs, remote_client);
1009 } 1028 }
1010 1029
1011 public void handleParcelObjectOwnersRequest(int local_id, IClientAPI remote_client) 1030 public void ClientOnParcelObjectOwnerRequest(int local_id, IClientAPI remote_client)
1012 { 1031 {
1013 ILandObject land; 1032 ILandObject land;
1014 lock (m_landList) 1033 lock (m_landList)
@@ -1026,7 +1045,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1026 } 1045 }
1027 } 1046 }
1028 1047
1029 public void handleParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client) 1048 public void ClientOnParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client)
1030 { 1049 {
1031 ILandObject land; 1050 ILandObject land;
1032 lock (m_landList) 1051 lock (m_landList)
@@ -1046,7 +1065,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1046 } 1065 }
1047 } 1066 }
1048 1067
1049 public void handleParcelAbandonRequest(int local_id, IClientAPI remote_client) 1068 public void ClientOnParcelAbandonRequest(int local_id, IClientAPI remote_client)
1050 { 1069 {
1051 ILandObject land; 1070 ILandObject land;
1052 lock (m_landList) 1071 lock (m_landList)
@@ -1068,7 +1087,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1068 } 1087 }
1069 } 1088 }
1070 1089
1071 public void handleParcelReclaim(int local_id, IClientAPI remote_client) 1090 public void ClientOnParcelReclaim(int local_id, IClientAPI remote_client)
1072 { 1091 {
1073 ILandObject land; 1092 ILandObject land;
1074 lock (m_landList) 1093 lock (m_landList)
@@ -1097,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1097 // and land has been validated as well, this method transfers 1116 // and land has been validated as well, this method transfers
1098 // the land ownership 1117 // the land ownership
1099 1118
1100 public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e) 1119 public void EventManagerOnLandBuy(Object o, EventManager.LandBuyArgs e)
1101 { 1120 {
1102 if (e.economyValidated && e.landValidated) 1121 if (e.economyValidated && e.landValidated)
1103 { 1122 {
@@ -1118,7 +1137,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1118 // be validated. This method validates the right to buy the 1137 // be validated. This method validates the right to buy the
1119 // parcel 1138 // parcel
1120 1139
1121 public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e) 1140 public void EventManagerOnValidateLandBuy(Object o, EventManager.LandBuyArgs e)
1122 { 1141 {
1123 if (e.landValidated == false) 1142 if (e.landValidated == false)
1124 { 1143 {
@@ -1150,7 +1169,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1150 } 1169 }
1151 1170
1152 1171
1153 void handleParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client) 1172 void ClientOnParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
1154 { 1173 {
1155 ILandObject land; 1174 ILandObject land;
1156 lock (m_landList) 1175 lock (m_landList)
@@ -1171,7 +1190,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1171 1190
1172 #region Land Object From Storage Functions 1191 #region Land Object From Storage Functions
1173 1192
1174 public void IncomingLandObjectsFromStorage(List<LandData> data) 1193 public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
1175 { 1194 {
1176 for (int i = 0; i < data.Count; i++) 1195 for (int i = 0; i < data.Count; i++)
1177 { 1196 {
@@ -1200,7 +1219,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1200 selectedParcel.returnLandObjects(returnType, agentIDs, taskIDs, remoteClient); 1219 selectedParcel.returnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
1201 } 1220 }
1202 1221
1203 public void NoLandDataFromStorage() 1222 public void EventManagerOnNoLandDataFromStorage()
1204 { 1223 {
1205 ResetSimLandObjects(); 1224 ResetSimLandObjects();
1206 } 1225 }
@@ -1224,7 +1243,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1224 1243
1225 #region CAPS handler 1244 #region CAPS handler
1226 1245
1227 private void OnRegisterCaps(UUID agentID, Caps caps) 1246 private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
1228 { 1247 {
1229 string capsBase = "/CAPS/" + caps.CapsObjectPath; 1248 string capsBase = "/CAPS/" + caps.CapsObjectPath;
1230 caps.RegisterHandler("RemoteParcelRequest", 1249 caps.RegisterHandler("RemoteParcelRequest",
@@ -1307,7 +1326,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1307 1326
1308 #endregion 1327 #endregion
1309 1328
1310 private void handleParcelDwell(int localID, IClientAPI remoteClient) 1329 private void ClientOnParcelDwellRequest(int localID, IClientAPI remoteClient)
1311 { 1330 {
1312 ILandObject selectedParcel = null; 1331 ILandObject selectedParcel = null;
1313 lock (m_landList) 1332 lock (m_landList)
@@ -1319,7 +1338,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1319 remoteClient.SendParcelDwellReply(localID, selectedParcel.landData.GlobalID, selectedParcel.landData.Dwell); 1338 remoteClient.SendParcelDwellReply(localID, selectedParcel.landData.GlobalID, selectedParcel.landData.Dwell);
1320 } 1339 }
1321 1340
1322 private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID) 1341 private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID)
1323 { 1342 {
1324 if (parcelID == UUID.Zero) 1343 if (parcelID == UUID.Zero)
1325 return; 1344 return;
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index bb06996..2701f60 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -44,7 +44,9 @@ namespace OpenSim.Region.CoreModules.World.Land
44 #region Member Variables 44 #region Member Variables
45 45
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 #pragma warning disable 0429
47 private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; 48 private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64;
49 #pragma warning restore 0429
48 private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax]; 50 private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax];
49 51
50 protected LandData m_landData = new LandData(); 52 protected LandData m_landData = new LandData();
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index 035e6f8..c525227 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -495,6 +495,29 @@ namespace OpenSim.Region.CoreModules.World.Land
495 495
496 } 496 }
497 497
498 public void UnCombineRegion(RegionData rdata)
499 {
500 lock (m_regions)
501 {
502 if (m_regions.ContainsKey(rdata.RegionId))
503 {
504 // uncombine root region and virtual regions
505 }
506 else
507 {
508 foreach (RegionConnections r in m_regions.Values)
509 {
510 foreach (RegionData rd in r.ConnectedRegions)
511 {
512 if (rd.RegionId == rdata.RegionId)
513 {
514 // uncombine virtual region
515 }
516 }
517 }
518 }
519 }
520 }
498 // Create a set of infinite borders around the whole aabb of the combined island. 521 // Create a set of infinite borders around the whole aabb of the combined island.
499 private void AdjustLargeRegionBounds() 522 private void AdjustLargeRegionBounds()
500 { 523 {
@@ -635,8 +658,8 @@ namespace OpenSim.Region.CoreModules.World.Land
635 658
636 public class LargeLandChannel : ILandChannel 659 public class LargeLandChannel : ILandChannel
637 { 660 {
638 private static readonly ILog m_log = 661 // private static readonly ILog m_log =
639 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 662 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
640 private RegionData RegData; 663 private RegionData RegData;
641 private ILandChannel RootRegionLandChannel; 664 private ILandChannel RootRegionLandChannel;
642 private readonly List<RegionData> RegionConnections; 665 private readonly List<RegionData> RegionConnections;
diff --git a/OpenSim/Region/Framework/Scenes/Border.cs b/OpenSim/Region/Framework/Scenes/Border.cs
index 8f02a9c..9a08afe 100644
--- a/OpenSim/Region/Framework/Scenes/Border.cs
+++ b/OpenSim/Region/Framework/Scenes/Border.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Framework.Scenes
103 case Cardinals.SE: // x+1, y-1 103 case Cardinals.SE: // x+1, y-1
104 break; 104 break;
105 case Cardinals.S: // x+0, y-1 105 case Cardinals.S: // x+0, y-1
106 if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y-1 < BorderLine.Z) 106 if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y < BorderLine.Z)
107 { 107 {
108 return true; 108 return true;
109 } 109 }
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Framework.Scenes
111 case Cardinals.SW: // x-1, y-1 111 case Cardinals.SW: // x-1, y-1
112 break; 112 break;
113 case Cardinals.W: // x-1, y+0 113 case Cardinals.W: // x-1, y+0
114 if (position.Y >= BorderLine.X && position.Y <= BorderLine.Y && position.X-1 < BorderLine.Z) 114 if (position.Y >= BorderLine.X && position.Y <= BorderLine.Y && position.X < BorderLine.Z)
115 { 115 {
116 return true; 116 return true;
117 } 117 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ec209ed..d1d82d6 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -337,22 +337,22 @@ namespace OpenSim.Region.Framework.Scenes
337 BordersLocked = true; 337 BordersLocked = true;
338 338
339 Border northBorder = new Border(); 339 Border northBorder = new Border();
340 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<--- 340 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
341 northBorder.CrossDirection = Cardinals.N; 341 northBorder.CrossDirection = Cardinals.N;
342 NorthBorders.Add(northBorder); 342 NorthBorders.Add(northBorder);
343 343
344 Border southBorder = new Border(); 344 Border southBorder = new Border();
345 southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //---> 345 southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
346 southBorder.CrossDirection = Cardinals.S; 346 southBorder.CrossDirection = Cardinals.S;
347 SouthBorders.Add(southBorder); 347 SouthBorders.Add(southBorder);
348 348
349 Border eastBorder = new Border(); 349 Border eastBorder = new Border();
350 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<--- 350 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
351 eastBorder.CrossDirection = Cardinals.E; 351 eastBorder.CrossDirection = Cardinals.E;
352 EastBorders.Add(eastBorder); 352 EastBorders.Add(eastBorder);
353 353
354 Border westBorder = new Border(); 354 Border westBorder = new Border();
355 westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //---> 355 westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
356 westBorder.CrossDirection = Cardinals.W; 356 westBorder.CrossDirection = Cardinals.W;
357 WestBorders.Add(westBorder); 357 WestBorders.Add(westBorder);
358 358
@@ -489,22 +489,22 @@ namespace OpenSim.Region.Framework.Scenes
489 { 489 {
490 BordersLocked = true; 490 BordersLocked = true;
491 Border northBorder = new Border(); 491 Border northBorder = new Border();
492 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<--- 492 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
493 northBorder.CrossDirection = Cardinals.N; 493 northBorder.CrossDirection = Cardinals.N;
494 NorthBorders.Add(northBorder); 494 NorthBorders.Add(northBorder);
495 495
496 Border southBorder = new Border(); 496 Border southBorder = new Border();
497 southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //---> 497 southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,0); //--->
498 southBorder.CrossDirection = Cardinals.S; 498 southBorder.CrossDirection = Cardinals.S;
499 SouthBorders.Add(southBorder); 499 SouthBorders.Add(southBorder);
500 500
501 Border eastBorder = new Border(); 501 Border eastBorder = new Border();
502 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<--- 502 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize ); //<---
503 eastBorder.CrossDirection = Cardinals.E; 503 eastBorder.CrossDirection = Cardinals.E;
504 EastBorders.Add(eastBorder); 504 EastBorders.Add(eastBorder);
505 505
506 Border westBorder = new Border(); 506 Border westBorder = new Border();
507 westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //---> 507 westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,0); //--->
508 westBorder.CrossDirection = Cardinals.W; 508 westBorder.CrossDirection = Cardinals.W;
509 WestBorders.Add(westBorder); 509 WestBorders.Add(westBorder);
510 BordersLocked = false; 510 BordersLocked = false;
@@ -1709,6 +1709,10 @@ namespace OpenSim.Region.Framework.Scenes
1709 1709
1710 int thisx = (int)RegionInfo.RegionLocX; 1710 int thisx = (int)RegionInfo.RegionLocX;
1711 int thisy = (int)RegionInfo.RegionLocY; 1711 int thisy = (int)RegionInfo.RegionLocY;
1712 Vector3 EastCross = new Vector3(0.1f,0,0);
1713 Vector3 WestCross = new Vector3(-0.1f, 0, 0);
1714 Vector3 NorthCross = new Vector3(0, 0.1f, 0);
1715 Vector3 SouthCross = new Vector3(0, -0.1f, 0);
1712 1716
1713 1717
1714 // use this if no borders were crossed! 1718 // use this if no borders were crossed!
@@ -1718,9 +1722,9 @@ namespace OpenSim.Region.Framework.Scenes
1718 1722
1719 Vector3 pos = attemptedPosition; 1723 Vector3 pos = attemptedPosition;
1720 1724
1721 if (TestBorderCross(attemptedPosition, Cardinals.W)) 1725 if (TestBorderCross(attemptedPosition + WestCross, Cardinals.W))
1722 { 1726 {
1723 if (TestBorderCross(attemptedPosition, Cardinals.S)) 1727 if (TestBorderCross(attemptedPosition + SouthCross, Cardinals.S))
1724 { 1728 {
1725 //Border crossedBorderx = GetCrossedBorder(attemptedPosition,Cardinals.W); 1729 //Border crossedBorderx = GetCrossedBorder(attemptedPosition,Cardinals.W);
1726 //Border crossedBordery = GetCrossedBorder(attemptedPosition, Cardinals.S); 1730 //Border crossedBordery = GetCrossedBorder(attemptedPosition, Cardinals.S);
@@ -1733,7 +1737,7 @@ namespace OpenSim.Region.Framework.Scenes
1733 // x - 1 1737 // x - 1
1734 // y - 1 1738 // y - 1
1735 } 1739 }
1736 else if (TestBorderCross(attemptedPosition, Cardinals.N)) 1740 else if (TestBorderCross(attemptedPosition + NorthCross, Cardinals.N))
1737 { 1741 {
1738 pos.X = ((pos.X + Constants.RegionSize)); 1742 pos.X = ((pos.X + Constants.RegionSize));
1739 pos.Y = ((pos.Y - Constants.RegionSize)); 1743 pos.Y = ((pos.Y - Constants.RegionSize));
@@ -1752,9 +1756,9 @@ namespace OpenSim.Region.Framework.Scenes
1752 // x - 1 1756 // x - 1
1753 } 1757 }
1754 } 1758 }
1755 else if (TestBorderCross(attemptedPosition, Cardinals.E)) 1759 else if (TestBorderCross(attemptedPosition + EastCross, Cardinals.E))
1756 { 1760 {
1757 if (TestBorderCross(attemptedPosition, Cardinals.S)) 1761 if (TestBorderCross(attemptedPosition + SouthCross, Cardinals.S))
1758 { 1762 {
1759 pos.X = ((pos.X - Constants.RegionSize)); 1763 pos.X = ((pos.X - Constants.RegionSize));
1760 pos.Y = ((pos.Y + Constants.RegionSize)); 1764 pos.Y = ((pos.Y + Constants.RegionSize));
@@ -1764,7 +1768,7 @@ namespace OpenSim.Region.Framework.Scenes
1764 // x + 1 1768 // x + 1
1765 // y - 1 1769 // y - 1
1766 } 1770 }
1767 else if (TestBorderCross(attemptedPosition, Cardinals.N)) 1771 else if (TestBorderCross(attemptedPosition + NorthCross, Cardinals.N))
1768 { 1772 {
1769 pos.X = ((pos.X - Constants.RegionSize)); 1773 pos.X = ((pos.X - Constants.RegionSize));
1770 pos.Y = ((pos.Y - Constants.RegionSize)); 1774 pos.Y = ((pos.Y - Constants.RegionSize));
@@ -1783,14 +1787,14 @@ namespace OpenSim.Region.Framework.Scenes
1783 // x + 1 1787 // x + 1
1784 } 1788 }
1785 } 1789 }
1786 else if (TestBorderCross(attemptedPosition, Cardinals.S)) 1790 else if (TestBorderCross(attemptedPosition + SouthCross, Cardinals.S))
1787 { 1791 {
1788 pos.Y = ((pos.Y + Constants.RegionSize)); 1792 pos.Y = ((pos.Y + Constants.RegionSize));
1789 newRegionHandle 1793 newRegionHandle
1790 = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy - 1) * Constants.RegionSize)); 1794 = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy - 1) * Constants.RegionSize));
1791 // y - 1 1795 // y - 1
1792 } 1796 }
1793 else if (TestBorderCross(attemptedPosition, Cardinals.N)) 1797 else if (TestBorderCross(attemptedPosition + NorthCross, Cardinals.N))
1794 { 1798 {
1795 1799
1796 pos.Y = ((pos.Y - Constants.RegionSize)); 1800 pos.Y = ((pos.Y - Constants.RegionSize));
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 1673a22..c6b3f30 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Framework.Scenes
1181 uint neighbourx = m_regionInfo.RegionLocX; 1181 uint neighbourx = m_regionInfo.RegionLocX;
1182 uint neighboury = m_regionInfo.RegionLocY; 1182 uint neighboury = m_regionInfo.RegionLocY;
1183 const float boundaryDistance = 1.7f; 1183 const float boundaryDistance = 1.7f;
1184 Vector3 northCross = new Vector3(0, boundaryDistance, 0); 1184 Vector3 northCross = new Vector3(0,boundaryDistance, 0);
1185 Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0); 1185 Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
1186 Vector3 eastCross = new Vector3(boundaryDistance, 0, 0); 1186 Vector3 eastCross = new Vector3(boundaryDistance, 0, 0);
1187 Vector3 westCross = new Vector3(-1 * boundaryDistance, 0, 0); 1187 Vector3 westCross = new Vector3(-1 * boundaryDistance, 0, 0);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 5be074e..6ba7e41 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -263,9 +263,9 @@ namespace OpenSim.Region.Framework.Scenes
263 set 263 set
264 { 264 {
265 Vector3 val = value; 265 Vector3 val = value;
266 266
267 if ((m_scene.TestBorderCross(val,Cardinals.E) || m_scene.TestBorderCross(val,Cardinals.W) 267 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
268 || m_scene.TestBorderCross(val, Cardinals.N) || m_scene.TestBorderCross(val, Cardinals.S)) 268 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
269 && !IsAttachment) 269 && !IsAttachment)
270 { 270 {
271 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 271 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index faa0157..65c5274 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
85 private static string m_freeSwitchRealm; 85 private static string m_freeSwitchRealm;
86 private static string m_freeSwitchSIPProxy; 86 private static string m_freeSwitchSIPProxy;
87 private static bool m_freeSwitchAttemptUseSTUN; 87 private static bool m_freeSwitchAttemptUseSTUN;
88 private static string m_freeSwitchSTUNServer; 88 // private static string m_freeSwitchSTUNServer;
89 private static string m_freeSwitchEchoServer; 89 private static string m_freeSwitchEchoServer;
90 private static int m_freeSwitchEchoPort; 90 private static int m_freeSwitchEchoPort;
91 private static string m_freeSwitchDefaultWellKnownIP; 91 private static string m_freeSwitchDefaultWellKnownIP;
@@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
144 m_freeSwitchRealm = m_config.GetString("freeswitch_realm", String.Empty); 144 m_freeSwitchRealm = m_config.GetString("freeswitch_realm", String.Empty);
145 m_freeSwitchSIPProxy = m_config.GetString("freeswitch_sip_proxy", m_freeSwitchRealm); 145 m_freeSwitchSIPProxy = m_config.GetString("freeswitch_sip_proxy", m_freeSwitchRealm);
146 m_freeSwitchAttemptUseSTUN = m_config.GetBoolean("freeswitch_attempt_stun", true); 146 m_freeSwitchAttemptUseSTUN = m_config.GetBoolean("freeswitch_attempt_stun", true);
147 m_freeSwitchSTUNServer = m_config.GetString("freeswitch_stun_server", m_freeSwitchRealm); 147 // m_freeSwitchSTUNServer = m_config.GetString("freeswitch_stun_server", m_freeSwitchRealm);
148 m_freeSwitchEchoServer = m_config.GetString("freeswitch_echo_server", m_freeSwitchRealm); 148 m_freeSwitchEchoServer = m_config.GetString("freeswitch_echo_server", m_freeSwitchRealm);
149 m_freeSwitchEchoPort = m_config.GetInt("freeswitch_echo_port", 50505); 149 m_freeSwitchEchoPort = m_config.GetInt("freeswitch_echo_port", 50505);
150 m_freeSwitchDefaultWellKnownIP = m_config.GetString("freeswitch_well_known_ip", m_freeSwitchRealm); 150 m_freeSwitchDefaultWellKnownIP = m_config.GetString("freeswitch_well_known_ip", m_freeSwitchRealm);
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 5c46344..8a07f71 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -172,6 +172,11 @@ namespace OpenSim.Region.Physics.Manager
172 return; 172 return;
173 } 173 }
174 174
175 public virtual void UnCombine(PhysicsScene pScene)
176 {
177
178 }
179
175 /// <summary> 180 /// <summary>
176 /// Queue a raycast against the physics scene. 181 /// Queue a raycast against the physics scene.
177 /// The provided callback method will be called when the raycast is complete 182 /// The provided callback method will be called when the raycast is complete
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index e702d5e..dc7010e 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -3436,7 +3436,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3436 3436
3437 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle); 3437 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
3438 d.GeomSetRotation(GroundGeom, ref R); 3438 d.GeomSetRotation(GroundGeom, ref R);
3439 d.GeomSetPosition(GroundGeom, pOffset.X + ((int)Constants.RegionSize * 0.5f), pOffset.Y + ((int)Constants.RegionSize * 0.5f), 0); 3439 d.GeomSetPosition(GroundGeom, (pOffset.X + ((int)Constants.RegionSize * 0.5f)) - 1, (pOffset.Y + ((int)Constants.RegionSize * 0.5f)) - 1, 0);
3440 IntPtr testGround = IntPtr.Zero; 3440 IntPtr testGround = IntPtr.Zero;
3441 if (RegionTerrain.TryGetValue(pOffset, out testGround)) 3441 if (RegionTerrain.TryGetValue(pOffset, out testGround))
3442 { 3442 {
@@ -3457,7 +3457,78 @@ namespace OpenSim.Region.Physics.OdePlugin
3457 return waterlevel; 3457 return waterlevel;
3458 } 3458 }
3459 3459
3460 public override bool SupportsCombining()
3461 {
3462 return true;
3463 }
3464
3465 public override void UnCombine(PhysicsScene pScene)
3466 {
3467 IntPtr localGround = IntPtr.Zero;
3468 float[] localHeightfield;
3469 bool proceed = false;
3470 List<IntPtr> geomDestroyList = new List<IntPtr>();
3471
3472 lock (OdeLock)
3473 {
3474 if (RegionTerrain.TryGetValue(Vector3.Zero, out localGround))
3475 {
3476 foreach (IntPtr geom in TerrainHeightFieldHeights.Keys)
3477 {
3478 if (geom == localGround)
3479 {
3480 localHeightfield = TerrainHeightFieldHeights[geom];
3481 proceed = true;
3482 }
3483 else
3484 {
3485 geomDestroyList.Add(geom);
3486 }
3487 }
3460 3488
3489 if (proceed)
3490 {
3491 m_worldOffset = Vector3.Zero;
3492 WorldExtents = new Vector2((int)Constants.RegionSize, (int)Constants.RegionSize);
3493 m_parentScene = null;
3494
3495 foreach (IntPtr g in geomDestroyList)
3496 {
3497 // removingHeightField needs to be done or the garbage collector will
3498 // collect the terrain data before we tell ODE to destroy it causing
3499 // memory corruption
3500 if (TerrainHeightFieldHeights.ContainsKey(g))
3501 {
3502 float[] removingHeightField = TerrainHeightFieldHeights[g];
3503 TerrainHeightFieldHeights.Remove(g);
3504
3505 if (RegionTerrain.ContainsKey(g))
3506 {
3507 RegionTerrain.Remove(g);
3508 }
3509
3510 d.GeomDestroy(g);
3511 removingHeightField = new float[0];
3512
3513
3514
3515 }
3516
3517 }
3518
3519 }
3520 else
3521 {
3522 m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data.");
3523
3524 }
3525
3526 }
3527
3528 }
3529 }
3530
3531
3461 3532
3462 public override void SetWaterLevel(float baseheight) 3533 public override void SetWaterLevel(float baseheight)
3463 { 3534 {
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index d404344..4313c96 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -43,11 +43,11 @@ namespace OpenSim.Tests.Common.Mock
43 } 43 }
44 private IUserDataPlugin m_userDataPlugin; 44 private IUserDataPlugin m_userDataPlugin;
45 45
46 public IInventoryDataPlugin InventoryDataPlugin 46 // public IInventoryDataPlugin InventoryDataPlugin
47 { 47 // {
48 get { return m_inventoryDataPlugin; } 48 // get { return m_inventoryDataPlugin; }
49 } 49 // }
50 private IInventoryDataPlugin m_inventoryDataPlugin; 50 // private IInventoryDataPlugin m_inventoryDataPlugin;
51 51
52 public TestCommunicationsManager() 52 public TestCommunicationsManager()
53 : this(null) 53 : this(null)
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 360e6b1..0d8baad 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -163,7 +163,7 @@ namespace OpenSim.Tests.Common.Setup
163 godsModule.Initialise(testScene, new IniConfigSource()); 163 godsModule.Initialise(testScene, new IniConfigSource());
164 testScene.AddModule(godsModule.Name, godsModule); 164 testScene.AddModule(godsModule.Name, godsModule);
165 realServices = realServices.ToLower(); 165 realServices = realServices.ToLower();
166 IConfigSource config = new IniConfigSource(); 166 // IConfigSource config = new IniConfigSource();
167 167
168 // If we have a brand new scene, need to initialize shared region modules 168 // If we have a brand new scene, need to initialize shared region modules
169 if ((m_assetService == null && m_inventoryService == null) || newScene) 169 if ((m_assetService == null && m_inventoryService == null) || newScene)