aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs12
1 files changed, 11 insertions, 1 deletions
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