diff options
author | UbitUmarov | 2016-12-14 13:35:53 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-14 13:35:53 +0000 |
commit | 18a292ad02e590619760a71aeb1514e6916b257f (patch) | |
tree | 584faa43265cc20ee36d92b2bc14cb1c55435ef0 /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into httptests (diff) | |
parent | fix: check for region_handle before region_id, viewers are so funny.. (diff) | |
download | opensim-SC-18a292ad02e590619760a71aeb1514e6916b257f.zip opensim-SC-18a292ad02e590619760a71aeb1514e6916b257f.tar.gz opensim-SC-18a292ad02e590619760a71aeb1514e6916b257f.tar.bz2 opensim-SC-18a292ad02e590619760a71aeb1514e6916b257f.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/CoreModules')
5 files changed, 33 insertions, 33 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs index 2bb24ae..0b1dbc7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | |||
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
154 | name = account.FirstName + " " + account.LastName; | 154 | name = account.FirstName + " " + account.LastName; |
155 | created = account.Created; | 155 | created = account.Created; |
156 | } | 156 | } |
157 | Byte[] charterMember = Utils.StringToBytes(name); | 157 | Byte[] membershipType = Utils.StringToBytes(name); |
158 | 158 | ||
159 | profileUrl = "No profile data"; | 159 | profileUrl = "No profile data"; |
160 | aboutText = string.Empty; | 160 | aboutText = string.Empty; |
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
166 | remoteClient.SendAvatarProperties(avatarID, aboutText, | 166 | remoteClient.SendAvatarProperties(avatarID, aboutText, |
167 | Util.ToDateTime(created).ToString( | 167 | Util.ToDateTime(created).ToString( |
168 | "M/d/yyyy", CultureInfo.InvariantCulture), | 168 | "M/d/yyyy", CultureInfo.InvariantCulture), |
169 | charterMember, firstLifeAboutText, | 169 | membershipType, firstLifeAboutText, |
170 | (uint)(0 & 0xff), | 170 | (uint)(0 & 0xff), |
171 | firstLifeImage, image, profileUrl, partner); | 171 | firstLifeImage, image, profileUrl, partner); |
172 | 172 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 5be8556..5314927 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -1009,9 +1009,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1009 | 1009 | ||
1010 | if (p != null && p.isNPC) | 1010 | if (p != null && p.isNPC) |
1011 | { | 1011 | { |
1012 | remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977", | 1012 | remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, |
1013 | Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16, | 1013 | Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16, |
1014 | UUID.Zero, UUID.Zero, "", UUID.Zero); | 1014 | UUID.Zero, ((INPC)(p.ControllingClient)).profileImage, "", UUID.Zero); |
1015 | remoteClient.SendAvatarInterestsReply(avatarID, 0, "", | 1015 | remoteClient.SendAvatarInterestsReply(avatarID, 0, "", |
1016 | 0, "Getting into trouble", "Droidspeak"); | 1016 | 0, "Getting into trouble", "Droidspeak"); |
1017 | return; | 1017 | return; |
@@ -1032,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1032 | userInfo = new Dictionary<string, object>(); | 1032 | userInfo = new Dictionary<string, object>(); |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | Byte[] charterMember = new Byte[1]; | 1035 | Byte[] membershipType = new Byte[1]; |
1036 | string born = String.Empty; | 1036 | string born = String.Empty; |
1037 | uint flags = 0x00; | 1037 | uint flags = 0x00; |
1038 | 1038 | ||
@@ -1040,11 +1040,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1040 | { | 1040 | { |
1041 | if (account.UserTitle == "") | 1041 | if (account.UserTitle == "") |
1042 | { | 1042 | { |
1043 | charterMember[0] = (Byte)((account.UserFlags & 0xf00) >> 8); | 1043 | membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8); |
1044 | } | 1044 | } |
1045 | else | 1045 | else |
1046 | { | 1046 | { |
1047 | charterMember = Utils.StringToBytes(account.UserTitle); | 1047 | membershipType = Utils.StringToBytes(account.UserTitle); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | born = Util.ToDateTime(account.Created).ToString( | 1050 | born = Util.ToDateTime(account.Created).ToString( |
@@ -1057,11 +1057,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1057 | { | 1057 | { |
1058 | if ((string)userInfo["user_title"] == "") | 1058 | if ((string)userInfo["user_title"] == "") |
1059 | { | 1059 | { |
1060 | charterMember[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); | 1060 | membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); |
1061 | } | 1061 | } |
1062 | else | 1062 | else |
1063 | { | 1063 | { |
1064 | charterMember = Utils.StringToBytes((string)userInfo["user_title"]); | 1064 | membershipType = Utils.StringToBytes((string)userInfo["user_title"]); |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | int val_born = (int)userInfo["user_created"]; | 1067 | int val_born = (int)userInfo["user_created"]; |
@@ -1085,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1085 | return; | 1085 | return; |
1086 | } | 1086 | } |
1087 | 1087 | ||
1088 | remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags, | 1088 | remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags, |
1089 | props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); | 1089 | props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); |
1090 | 1090 | ||
1091 | 1091 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ad094b4..58d6cf2 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
456 | } | 456 | } |
457 | 457 | ||
458 | // Check Default Location (Also See ScenePresence.CompleteMovement) | 458 | // Check Default Location (Also See ScenePresence.CompleteMovement) |
459 | if (position.X == 128f && position.Y == 128f) | 459 | if (position.X == 128f && position.Y == 128f && position.Z == 22.5f) |
460 | position = sp.Scene.RegionInfo.DefaultLandingPoint; | 460 | position = sp.Scene.RegionInfo.DefaultLandingPoint; |
461 | 461 | ||
462 | // TODO: Get proper AVG Height | 462 | // TODO: Get proper AVG Height |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 98f1f3b..bec5322 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -72,8 +72,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
72 | 72 | ||
73 | public const int LandUnit = 4; | 73 | public const int LandUnit = 4; |
74 | 74 | ||
75 | private static readonly string remoteParcelRequestPath = "0009/"; | ||
76 | |||
77 | private LandChannel landChannel; | 75 | private LandChannel landChannel; |
78 | private Scene m_scene; | 76 | private Scene m_scene; |
79 | 77 | ||
@@ -1682,12 +1680,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1682 | 1680 | ||
1683 | private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) | 1681 | private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) |
1684 | { | 1682 | { |
1683 | //string capsBase = "/CAPS/" + UUID.Random(); | ||
1685 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 1684 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
1686 | caps.RegisterHandler( | 1685 | caps.RegisterHandler( |
1687 | "RemoteParcelRequest", | 1686 | "RemoteParcelRequest", |
1688 | new RestStreamHandler( | 1687 | new RestStreamHandler( |
1689 | "POST", | 1688 | "POST", |
1690 | capsBase + remoteParcelRequestPath, | 1689 | capsBase, |
1691 | (request, path, param, httpRequest, httpResponse) | 1690 | (request, path, param, httpRequest, httpResponse) |
1692 | => RemoteParcelRequest(request, path, param, agentID, caps), | 1691 | => RemoteParcelRequest(request, path, param, agentID, caps), |
1693 | "RemoteParcelRequest", | 1692 | "RemoteParcelRequest", |
@@ -1807,24 +1806,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1807 | ArrayList list = (ArrayList)hash["location"]; | 1806 | ArrayList list = (ArrayList)hash["location"]; |
1808 | uint x = (uint)(double)list[0]; | 1807 | uint x = (uint)(double)list[0]; |
1809 | uint y = (uint)(double)list[1]; | 1808 | uint y = (uint)(double)list[1]; |
1810 | if(hash.ContainsKey("region_id")) | 1809 | if (hash.ContainsKey("region_handle")) |
1811 | { | ||
1812 | UUID regionID = (UUID)hash["region_id"]; | ||
1813 | if (regionID == m_scene.RegionInfo.RegionID) | ||
1814 | { | ||
1815 | // a parcel request for a local parcel => no need to query the grid | ||
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 | } | ||
1825 | } | ||
1826 | |||
1827 | else if (hash.ContainsKey("region_handle")) | ||
1828 | { | 1810 | { |
1829 | // if you do a "About Landmark" on a landmark a second time, the viewer sends the | 1811 | // if you do a "About Landmark" on a landmark a second time, the viewer sends the |
1830 | // region_handle it got earlier via RegionHandleRequest | 1812 | // region_handle it got earlier via RegionHandleRequest |
@@ -1847,6 +1829,24 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1847 | } | 1829 | } |
1848 | } | 1830 | } |
1849 | } | 1831 | } |
1832 | else if(hash.ContainsKey("region_id")) | ||
1833 | { | ||
1834 | UUID regionID = (UUID)hash["region_id"]; | ||
1835 | if (regionID == m_scene.RegionInfo.RegionID) | ||
1836 | { | ||
1837 | // a parcel request for a local parcel => no need to query the grid | ||
1838 | parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); | ||
1839 | } | ||
1840 | else | ||
1841 | { | ||
1842 | // a parcel request for a parcel in another region. Ask the grid about the region | ||
1843 | GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID); | ||
1844 | if (info != null) | ||
1845 | parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); | ||
1846 | } | ||
1847 | } | ||
1848 | |||
1849 | |||
1850 | } | 1850 | } |
1851 | } | 1851 | } |
1852 | catch (LLSD.LLSDParseException e) | 1852 | catch (LLSD.LLSDParseException e) |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index d1fe3c7..fb63c6a 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
216 | // while we don't fix the hard-coded urls | 216 | // while we don't fix the hard-coded urls |
217 | if (flags == 2) | 217 | if (flags == 2) |
218 | { | 218 | { |
219 | if (regionInfos.Count == 0) | 219 | if (regionInfos == null || regionInfos.Count == 0) |
220 | remoteClient.SendAgentAlertMessage("No regions found with that name.", true); | 220 | remoteClient.SendAgentAlertMessage("No regions found with that name.", true); |
221 | // else if (regionInfos.Count == 1) | 221 | // else if (regionInfos.Count == 1) |
222 | // remoteClient.SendAgentAlertMessage("Region found!", false); | 222 | // remoteClient.SendAgentAlertMessage("Region found!", false); |