From 66990394c9a60e596cc07c4b547291afd7447133 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 9 Dec 2016 22:56:11 +0000 Subject: avoid a null ref --- OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') 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 // while we don't fix the hard-coded urls if (flags == 2) { - if (regionInfos.Count == 0) + if (regionInfos == null || regionInfos.Count == 0) remoteClient.SendAgentAlertMessage("No regions found with that name.", true); // else if (regionInfos.Count == 1) // remoteClient.SendAgentAlertMessage("Region found!", false); -- cgit v1.1 From d49a5374c37967110a8bf11844893f62951878ee Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Sat, 10 Dec 2016 18:03:05 +0000 Subject: Make it more unlikely that a script teleport will be caught by default region landing point. --- .../Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') 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 } // Check Default Location (Also See ScenePresence.CompleteMovement) - if (position.X == 128f && position.Y == 128f) + if (position.X == 128f && position.Y == 128f && position.Z == 22.5f) position = sp.Scene.RegionInfo.DefaultLandingPoint; // TODO: Get proper AVG Height -- cgit v1.1 From 5b7986e6beb3d452a2845fa367b26c818098aba5 Mon Sep 17 00:00:00 2001 From: Mandarinka Tasty Date: Sat, 10 Dec 2016 21:15:22 +0100 Subject: Setting precise date of creation in NPC's profile. Signed-off-by: Mandarinka Tasty Signed-off-by: UbitUmarov --- OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 5be8556..7d68299 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs @@ -1009,7 +1009,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles if (p != null && p.isNPC) { - remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977", + remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16, UUID.Zero, UUID.Zero, "", UUID.Zero); remoteClient.SendAvatarInterestsReply(avatarID, 0, "", -- cgit v1.1 From 1388ac2ef7d774b4d25f18d237fdad89d7ac43ac Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 12 Dec 2016 11:09:38 +0000 Subject: Rename charterMember to membershipType to show what it actually is. This field started out as a simple flag in the protocol to indicate a user being a SL charter member. It has since then taken on additional functionality that means that the name is no longer appropriate. --- .../Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | 4 ++-- .../CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules') 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 name = account.FirstName + " " + account.LastName; created = account.Created; } - Byte[] charterMember = Utils.StringToBytes(name); + Byte[] membershipType = Utils.StringToBytes(name); profileUrl = "No profile data"; aboutText = string.Empty; @@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile remoteClient.SendAvatarProperties(avatarID, aboutText, Util.ToDateTime(created).ToString( "M/d/yyyy", CultureInfo.InvariantCulture), - charterMember, firstLifeAboutText, + membershipType, firstLifeAboutText, (uint)(0 & 0xff), firstLifeImage, image, profileUrl, partner); diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 7d68299..ce5816b 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs @@ -1032,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles userInfo = new Dictionary(); } - Byte[] charterMember = new Byte[1]; + Byte[] membershipType = new Byte[1]; string born = String.Empty; uint flags = 0x00; @@ -1040,11 +1040,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles { if (account.UserTitle == "") { - charterMember[0] = (Byte)((account.UserFlags & 0xf00) >> 8); + membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8); } else { - charterMember = Utils.StringToBytes(account.UserTitle); + membershipType = Utils.StringToBytes(account.UserTitle); } born = Util.ToDateTime(account.Created).ToString( @@ -1057,11 +1057,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles { if ((string)userInfo["user_title"] == "") { - charterMember[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); + membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); } else { - charterMember = Utils.StringToBytes((string)userInfo["user_title"]); + membershipType = Utils.StringToBytes((string)userInfo["user_title"]); } int val_born = (int)userInfo["user_created"]; @@ -1085,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles return; } - remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags, + remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags, props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); -- cgit v1.1 From ec883d0f1504e8573f763882231cb1da06bdc2a1 Mon Sep 17 00:00:00 2001 From: Mandarinka Tasty Date: Wed, 14 Dec 2016 01:14:23 +0100 Subject: New OSSL function: osNpcSetProfileImage(LSL_Key npc, string image); This patch gives possibility to set image in created NPC's profile. You can use UUID of the texture or name of texture included in prim's inventory. Signed-off-by: Mandarinka Tasty Signed-off-by: UbitUmarov --- OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index ce5816b..5314927 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs @@ -1011,7 +1011,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles { remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16, - UUID.Zero, UUID.Zero, "", UUID.Zero); + UUID.Zero, ((INPC)(p.ControllingClient)).profileImage, "", UUID.Zero); remoteClient.SendAvatarInterestsReply(avatarID, 0, "", 0, "Getting into trouble", "Droidspeak"); return; -- cgit v1.1 From 50842347ace4f9ada316364d08ccc0675901f84b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 14 Dec 2016 04:00:48 +0000 Subject: fix: check for region_handle before region_id, viewers are so funny.. --- .../CoreModules/World/Land/LandManagementModule.cs | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/CoreModules') 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 public const int LandUnit = 4; - private static readonly string remoteParcelRequestPath = "0009/"; - private LandChannel landChannel; private Scene m_scene; @@ -1682,12 +1680,13 @@ namespace OpenSim.Region.CoreModules.World.Land private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) { + //string capsBase = "/CAPS/" + UUID.Random(); string capsBase = "/CAPS/" + caps.CapsObjectPath; caps.RegisterHandler( "RemoteParcelRequest", new RestStreamHandler( "POST", - capsBase + remoteParcelRequestPath, + capsBase, (request, path, param, httpRequest, httpResponse) => RemoteParcelRequest(request, path, param, agentID, caps), "RemoteParcelRequest", @@ -1807,24 +1806,7 @@ namespace OpenSim.Region.CoreModules.World.Land ArrayList list = (ArrayList)hash["location"]; uint x = (uint)(double)list[0]; uint y = (uint)(double)list[1]; - if(hash.ContainsKey("region_id")) - { - UUID regionID = (UUID)hash["region_id"]; - if (regionID == m_scene.RegionInfo.RegionID) - { - // a parcel request for a local parcel => no need to query the grid - parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); - } - else - { - // a parcel request for a parcel in another region. Ask the grid about the region - GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID); - if (info != null) - parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); - } - } - - else if (hash.ContainsKey("region_handle")) + if (hash.ContainsKey("region_handle")) { // if you do a "About Landmark" on a landmark a second time, the viewer sends the // region_handle it got earlier via RegionHandleRequest @@ -1847,6 +1829,24 @@ namespace OpenSim.Region.CoreModules.World.Land } } } + else if(hash.ContainsKey("region_id")) + { + UUID regionID = (UUID)hash["region_id"]; + if (regionID == m_scene.RegionInfo.RegionID) + { + // a parcel request for a local parcel => no need to query the grid + parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); + } + else + { + // a parcel request for a parcel in another region. Ask the grid about the region + GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID); + if (info != null) + parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); + } + } + + } } catch (LLSD.LLSDParseException e) -- cgit v1.1