aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-07-14 15:21:59 +0100
committerUbitUmarov2018-07-14 15:21:59 +0100
commit0731220a9dca5cc2107246c2bd769d002d921239 (patch)
treee2f82c827a702896629feceedca666c52be3e5bb /OpenSim/Region
parentonly resize if need (diff)
downloadopensim-SC-0731220a9dca5cc2107246c2bd769d002d921239.zip
opensim-SC-0731220a9dca5cc2107246c2bd769d002d921239.tar.gz
opensim-SC-0731220a9dca5cc2107246c2bd769d002d921239.tar.bz2
opensim-SC-0731220a9dca5cc2107246c2bd769d002d921239.tar.xz
change bitmasks work
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs11
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs4
2 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 7ba4a48..c32de62 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -2033,25 +2033,18 @@ namespace OpenSim.Region.CoreModules.World.Land
2033 { 2033 {
2034 UUID parcel = UUID.Zero; 2034 UUID parcel = UUID.Zero;
2035 UUID.TryParse(id, out parcel); 2035 UUID.TryParse(id, out parcel);
2036
2037 // assume we've got the parcelID we just computed in RemoteParcelRequest 2036 // assume we've got the parcelID we just computed in RemoteParcelRequest
2038 ExtendedLandData extLandData = new ExtendedLandData(); 2037 ExtendedLandData extLandData = new ExtendedLandData();
2039 if(!Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, 2038 if(!Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
2040 out extLandData.X, out extLandData.Y)) 2039 out extLandData.X, out extLandData.Y))
2041 return null; 2040 return null;
2042 m_log.DebugFormat("[LAND MANAGEMENT MODULE] : Got parcelinfo request for regionHandle {0}, x/y {1}/{2}", 2041 m_log.DebugFormat("[LAND MANAGEMENT MODULE]: Got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
2043 extLandData.RegionHandle, extLandData.X, extLandData.Y); 2042 extLandData.RegionHandle, extLandData.X, extLandData.Y);
2044 2043
2045 // for this region or for somewhere else? 2044 // for this region or for somewhere else?
2046 if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) 2045 if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
2047 { 2046 {
2048 ILandObject extLandObject = this.GetLandObject(extLandData.X, extLandData.Y); 2047 extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData;
2049 if(extLandObject == null)
2050 {
2051 m_log.DebugFormat("[LAND MANAGEMENT MODULE]: ParcelInfoRequest: a FakeParcelID points to outside the region");
2052 return null;
2053 }
2054 extLandData.LandData = extLandObject.LandData;
2055 extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; 2048 extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel;
2056 } 2049 }
2057 else 2050 else
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 51e6071..cbe8a2e 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -1460,9 +1460,9 @@ namespace OpenSim.Region.CoreModules.World.Land
1460 for (int i = 0; i < bitmapLen; i++) 1460 for (int i = 0; i < bitmapLen; i++)
1461 { 1461 {
1462 tempByte = LandData.Bitmap[i]; 1462 tempByte = LandData.Bitmap[i];
1463 for (int bitNum = 0; bitNum < 8; bitNum++) 1463 for (int bitmask = 0x80; bitmask > 0; bitmask = bitmask >> 1)
1464 { 1464 {
1465 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1); 1465 bool bit = (tempByte & bitmask) == bitmask;
1466 try 1466 try
1467 { 1467 {
1468 tempConvertMap[x, y] = bit; 1468 tempConvertMap[x, y] = bit;