aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandChannel.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/ILandChannel.cs25
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs1
5 files changed, 44 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
index f08d8ec..71bfe57 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -93,6 +93,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
93 List<EntityBase> entities = m_scene.GetEntities(); 93 List<EntityBase> entities = m_scene.GetEntities();
94 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 94 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
95 95
96 /*
97 foreach (ILandObject lo in m_scene.LandChannel.AllParcels())
98 {
99 if (name == lo.LandData.Name)
100 {
101 // This is the parcel we want
102 }
103 }
104 */
105
96 // Filter entities so that we only have scene objects. 106 // Filter entities so that we only have scene objects.
97 // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods 107 // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods
98 // end up having to do this 108 // end up having to do this
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
index 4ed23bb..81024db 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.Land
105 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 105 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
106 obj.LandData.Name = "NO LAND"; 106 obj.LandData.Name = "NO LAND";
107 return obj; 107 return obj;
108 } 108 }
109 109
110 public List<ILandObject> AllParcels() 110 public List<ILandObject> AllParcels()
111 { 111 {
@@ -154,6 +154,7 @@ namespace OpenSim.Region.CoreModules.World.Land
154 m_landManagementModule.UpdateLandObject(localID, data); 154 m_landManagementModule.UpdateLandObject(localID, data);
155 } 155 }
156 } 156 }
157
157 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) 158 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
158 { 159 {
159 if (m_landManagementModule != null) 160 if (m_landManagementModule != null)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 968f46a..9a2ef50 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -67,7 +67,14 @@ namespace OpenSim.Region.CoreModules.World.Land
67 private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; 67 private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64;
68 #pragma warning restore 0429 68 #pragma warning restore 0429
69 69
70 /// <value>
71 /// Local land ids at specified region co-ordinates (region size / 4)
72 /// </value>
70 private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; 73 private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
74
75 /// <value>
76 /// Land objects keyed by local id
77 /// </value>
71 private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); 78 private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
72 79
73 private bool m_landPrimCountTainted; 80 private bool m_landPrimCountTainted;
@@ -570,6 +577,7 @@ namespace OpenSim.Region.CoreModules.World.Land
570 577
571 if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) 578 if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0)
572 return null; 579 return null;
580
573 try 581 try
574 { 582 {
575 x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); 583 x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0));
@@ -584,6 +592,7 @@ namespace OpenSim.Region.CoreModules.World.Land
584 { 592 {
585 return null; 593 return null;
586 } 594 }
595
587 lock (m_landList) 596 lock (m_landList)
588 { 597 {
589 // Corner case. If an autoreturn happens during sim startup 598 // Corner case. If an autoreturn happens during sim startup
@@ -603,6 +612,7 @@ namespace OpenSim.Region.CoreModules.World.Land
603 // they happen every time at border crossings 612 // they happen every time at border crossings
604 throw new Exception("Error: Parcel not found at point " + x + ", " + y); 613 throw new Exception("Error: Parcel not found at point " + x + ", " + y);
605 } 614 }
615
606 lock (m_landIDList) 616 lock (m_landIDList)
607 { 617 {
608 try 618 try
@@ -617,7 +627,7 @@ namespace OpenSim.Region.CoreModules.World.Land
617 return null; 627 return null;
618 } 628 }
619 } 629 }
620 } 630 }
621 631
622 #endregion 632 #endregion
623 633
diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs
index 74f404f..6fe6118 100644
--- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs
+++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs
@@ -33,26 +33,41 @@ namespace OpenSim.Region.Framework.Interfaces
33{ 33{
34 public interface ILandChannel 34 public interface ILandChannel
35 { 35 {
36 List<ILandObject> ParcelsNearPoint(Vector3 position); 36 /// <summary>
37 /// Get all parcels
38 /// </summary>
39 /// <returns></returns>
37 List<ILandObject> AllParcels(); 40 List<ILandObject> AllParcels();
38 41
39 /// <summary> 42 /// <summary>
40 /// Get the land object at the specified point 43 /// Get the parcel at the specified point
41 /// </summary> 44 /// </summary>
42 /// <param name="x">Value between 0 - 256 on the x axis of the point</param> 45 /// <param name="x">Value between 0 - 256 on the x axis of the point</param>
43 /// <param name="y">Value between 0 - 256 on the y axis of the point</param> 46 /// <param name="y">Value between 0 - 256 on the y axis of the point</param>
44 /// <returns>Land object at the point supplied</returns> 47 /// <returns>Land object at the point supplied</returns>
45 ILandObject GetLandObject(int x, int y); 48 ILandObject GetLandObject(int x, int y);
46 49
47 ILandObject GetLandObject(int localID);
48
49 /// <summary> 50 /// <summary>
50 /// Get the land object at the specified point 51 /// Get the parcel at the specified point
51 /// </summary> 52 /// </summary>
52 /// <param name="x">Value between 0 - 256 on the x axis of the point</param> 53 /// <param name="x">Value between 0 - 256 on the x axis of the point</param>
53 /// <param name="y">Value between 0 - 256 on the y axis of the point</param> 54 /// <param name="y">Value between 0 - 256 on the y axis of the point</param>
54 /// <returns>Land object at the point supplied</returns> 55 /// <returns>Land object at the point supplied</returns>
55 ILandObject GetLandObject(float x, float y); 56 ILandObject GetLandObject(float x, float y);
57
58 /// <summary>
59 /// Get the parcels near the specified point
60 /// </summary>
61 /// <param name="position"></param>
62 /// <returns></returns>
63 List<ILandObject> ParcelsNearPoint(Vector3 position);
64
65 /// <summary>
66 /// Get the parcel given the land's local id.
67 /// </summary>
68 /// <param name="localID"></param>
69 /// <returns></returns>
70 ILandObject GetLandObject(int localID);
56 71
57 bool IsLandPrimCountTainted(); 72 bool IsLandPrimCountTainted();
58 bool IsForcefulBansAllowed(); 73 bool IsForcefulBansAllowed();
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
index 146ec66..9da818a 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
@@ -118,6 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
118 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); 118 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
119 } 119 }
120 } 120 }
121
121 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); 122 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
122 obj.LandData.Name = "NO LAND"; 123 obj.LandData.Name = "NO LAND";
123 return obj; 124 return obj;