aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2009-09-02 16:29:50 +0100
committerMelanie2009-09-02 16:29:50 +0100
commit8e7b385883a2d9e590490c2d28cd2dbe2a7c5d95 (patch)
treeaa5824b7839df1471077b276bf0cb89c13369805 /OpenSim/Region/Framework/Scenes
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/Region/Framework/Scenes')
-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
4 files changed, 26 insertions, 22 deletions
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);