aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2016-11-24 20:53:04 +0000
committerUbitUmarov2016-11-24 20:53:04 +0000
commitf9b62b5680be1935857e9517b1a6bcd770c7b683 (patch)
tree88c3215e55d43bd3f41847305205ba194431cc9a
parent revert changes to asset desc size, my bad.. this field will possible go away... (diff)
downloadopensim-SC_OLD-f9b62b5680be1935857e9517b1a6bcd770c7b683.zip
opensim-SC_OLD-f9b62b5680be1935857e9517b1a6bcd770c7b683.tar.gz
opensim-SC_OLD-f9b62b5680be1935857e9517b1a6bcd770c7b683.tar.bz2
opensim-SC_OLD-f9b62b5680be1935857e9517b1a6bcd770c7b683.tar.xz
work around viewers not suporting large regions on landmark creation. They still may display wrong offset; don't let inventory description be limited by asset description side on a ossl method
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs53
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
2 files changed, 39 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 11a6d9f..98f1f3b 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1801,30 +1801,51 @@ namespace OpenSim.Region.CoreModules.World.Land
1801 { 1801 {
1802 Hashtable hash = new Hashtable(); 1802 Hashtable hash = new Hashtable();
1803 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); 1803 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
1804 if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) 1804 if (hash.ContainsKey("location"))
1805 { 1805 {
1806 UUID regionID = (UUID)hash["region_id"]; 1806 UUID scope = m_scene.RegionInfo.ScopeID;
1807 ArrayList list = (ArrayList)hash["location"]; 1807 ArrayList list = (ArrayList)hash["location"];
1808 uint x = (uint)(double)list[0]; 1808 uint x = (uint)(double)list[0];
1809 uint y = (uint)(double)list[1]; 1809 uint y = (uint)(double)list[1];
1810 if (hash.ContainsKey("region_handle")) 1810 if(hash.ContainsKey("region_id"))
1811 {
1812 // if you do a "About Landmark" on a landmark a second time, the viewer sends the
1813 // region_handle it got earlier via RegionHandleRequest
1814 ulong regionHandle = Util.BytesToUInt64Big((byte[])hash["region_handle"]);
1815 parcelID = Util.BuildFakeParcelID(regionHandle, x, y);
1816 }
1817 else if (regionID == m_scene.RegionInfo.RegionID)
1818 { 1811 {
1812 UUID regionID = (UUID)hash["region_id"];
1813 if (regionID == m_scene.RegionInfo.RegionID)
1814 {
1819 // a parcel request for a local parcel => no need to query the grid 1815 // a parcel request for a local parcel => no need to query the grid
1820 parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); 1816 parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
1817 }
1818 else
1819 {
1820 // a parcel request for a parcel in another region. Ask the grid about the region
1821 GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
1822 if (info != null)
1823 parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
1824 }
1821 } 1825 }
1822 else 1826
1827 else if (hash.ContainsKey("region_handle"))
1823 { 1828 {
1824 // a parcel request for a parcel in another region. Ask the grid about the region 1829 // if you do a "About Landmark" on a landmark a second time, the viewer sends the
1825 GridRegion info = m_scene.GridService.GetRegionByUUID(UUID.Zero, regionID); 1830 // region_handle it got earlier via RegionHandleRequest
1826 if (info != null) 1831 ulong regionHandle = Util.BytesToUInt64Big((byte[])hash["region_handle"]);
1827 parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); 1832 if(regionHandle == m_scene.RegionInfo.RegionHandle)
1833 parcelID = Util.BuildFakeParcelID(regionHandle, x, y);
1834 else
1835 {
1836 uint wx;
1837 uint wy;
1838 Util.RegionHandleToWorldLoc(regionHandle, out wx, out wy);
1839 wx += x;
1840 wy += y;
1841 GridRegion info = m_scene.GridService.GetRegionByPosition(scope, (int)wx, (int)wy);
1842 if(info != null)
1843 {
1844 wx -= (uint)info.RegionLocX;
1845 wy -= (uint)info.RegionLocY;
1846 parcelID = Util.BuildFakeParcelID(info.RegionHandle, wx, wy);
1847 }
1848 }
1828 } 1849 }
1829 } 1850 }
1830 } 1851 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 57bff6e..1a594e1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1938,8 +1938,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1938 taskItem.ResetIDs(m_host.UUID); 1938 taskItem.ResetIDs(m_host.UUID);
1939 taskItem.ParentID = m_host.UUID; 1939 taskItem.ParentID = m_host.UUID;
1940 taskItem.CreationDate = (uint)Util.UnixTimeSinceEpoch(); 1940 taskItem.CreationDate = (uint)Util.UnixTimeSinceEpoch();
1941 taskItem.Name = asset.Name; 1941 taskItem.Name = name;
1942 taskItem.Description = asset.Description; 1942 taskItem.Description = description;
1943 taskItem.Type = (int)AssetType.Notecard; 1943 taskItem.Type = (int)AssetType.Notecard;
1944 taskItem.InvType = (int)InventoryType.Notecard; 1944 taskItem.InvType = (int)InventoryType.Notecard;
1945 taskItem.OwnerID = m_host.OwnerID; 1945 taskItem.OwnerID = m_host.OwnerID;