aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/LandObject.cs
diff options
context:
space:
mode:
authorRobert Adams2013-11-10 19:52:31 -0800
committerRobert Adams2013-11-10 19:52:31 -0800
commitc12e68e34d6f9340bbd17a2f183fe9859483cc6f (patch)
tree8fa99677885eb8dde5e352953dbbbb9fbbd2b2c6 /OpenSim/Region/CoreModules/World/Land/LandObject.cs
parentMerge branch 'master' into varregion (diff)
downloadopensim-SC_OLD-c12e68e34d6f9340bbd17a2f183fe9859483cc6f.zip
opensim-SC_OLD-c12e68e34d6f9340bbd17a2f183fe9859483cc6f.tar.gz
opensim-SC_OLD-c12e68e34d6f9340bbd17a2f183fe9859483cc6f.tar.bz2
opensim-SC_OLD-c12e68e34d6f9340bbd17a2f183fe9859483cc6f.tar.xz
varregion: fix GetLandObject error return and initialization of square
land object bitmaps. This fixes creation of child presences and the editing of parcels. Also lots of commented out debugging messages.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 0bde877..2a4d8d8 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -102,6 +102,8 @@ namespace OpenSim.Region.CoreModules.World.Land
102 } 102 }
103 } 103 }
104 104
105 m_log.ErrorFormat("{0} StartPoint. No start point found. bitmapSize=<{1},{2}>",
106 LogHeader, LandBitmap.GetLength(0), LandBitmap.GetLength(1));
105 return new Vector3(-1, -1, -1); 107 return new Vector3(-1, -1, -1);
106 } 108 }
107 } 109 }
@@ -121,6 +123,8 @@ namespace OpenSim.Region.CoreModules.World.Land
121 } 123 }
122 } 124 }
123 125
126 m_log.ErrorFormat("{0} EndPoint. No end point found. bitmapSize=<{1},{2}>",
127 LogHeader, LandBitmap.GetLength(0), LandBitmap.GetLength(1));
124 return new Vector3(-1, -1, -1); 128 return new Vector3(-1, -1, -1);
125 } 129 }
126 } 130 }
@@ -757,6 +761,7 @@ namespace OpenSim.Region.CoreModules.World.Land
757 public void SetLandBitmap(bool[,] bitmap) 761 public void SetLandBitmap(bool[,] bitmap)
758 { 762 {
759 LandBitmap = bitmap; 763 LandBitmap = bitmap;
764 // m_log.DebugFormat("{0} SetLandBitmap. BitmapSize=<{1},{2}>", LogHeader, LandBitmap.GetLength(0), LandBitmap.GetLength(1));
760 ForceUpdateLandInfo(); 765 ForceUpdateLandInfo();
761 } 766 }
762 767
@@ -776,10 +781,14 @@ namespace OpenSim.Region.CoreModules.World.Land
776 781
777 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y) 782 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y)
778 { 783 {
779 bool[,] tempBitmap = new bool[(end_x-start_x)/landUnit,(end_y-start_y)/landUnit]; 784 // Empty bitmap for the whole region
785 bool[,] tempBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit];
780 tempBitmap.Initialize(); 786 tempBitmap.Initialize();
781 787
788 // Fill the bitmap square area specified by state and end
782 tempBitmap = ModifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true); 789 tempBitmap = ModifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true);
790 // m_log.DebugFormat("{0} GetSquareLandBitmap. tempBitmapSize=<{1},{2}>",
791 // LogHeader, tempBitmap.GetLength(0), tempBitmap.GetLength(1));
783 return tempBitmap; 792 return tempBitmap;
784 } 793 }
785 794
@@ -808,6 +817,8 @@ namespace OpenSim.Region.CoreModules.World.Land
808 } 817 }
809 } 818 }
810 } 819 }
820 // m_log.DebugFormat("{0} ModifyLandBitmapSquare. startXY=<{1},{2}>, endXY=<{3},{4}>, val={5}, landBitmapSize=<{6},{7}>",
821 // LogHeader, start_x, start_y, end_x, end_y, set_value, land_bitmap.GetLength(0), land_bitmap.GetLength(1));
811 return land_bitmap; 822 return land_bitmap;
812 } 823 }
813 824
@@ -868,6 +879,8 @@ namespace OpenSim.Region.CoreModules.World.Land
868 } 879 }
869 } 880 }
870 } 881 }
882 // m_log.DebugFormat("{0} ConvertLandBitmapToBytes. BitmapSize=<{1},{2}>",
883 // LogHeader, LandBitmap.GetLength(0), LandBitmap.GetLength(1));
871 return tempConvertArr; 884 return tempConvertArr;
872 } 885 }
873 886
@@ -886,7 +899,7 @@ namespace OpenSim.Region.CoreModules.World.Land
886 // and only set the lower area of the larger region. 899 // and only set the lower area of the larger region.
887 xLen = (int)(Constants.RegionSize / landUnit); 900 xLen = (int)(Constants.RegionSize / landUnit);
888 } 901 }
889 m_log.DebugFormat("{0} ConvertBytesToLandBitmap: bitmapLen={1}, xLen={2}", LogHeader, bitmapLen, xLen); 902 // m_log.DebugFormat("{0} ConvertBytesToLandBitmap: bitmapLen={1}, xLen={2}", LogHeader, bitmapLen, xLen);
890 903
891 int x = 0, y = 0; 904 int x = 0, y = 0;
892 for (int i = 0; i < bitmapLen; i++) 905 for (int i = 0; i < bitmapLen; i++)