From 84a6a6e008c64d8197177aff1b42a412e5623638 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 28 Jun 2016 23:52:00 +0100 Subject: [PATCH] don't try to send initial AgentGroupDataUpdate to NPCs --- OpenSim/Addons/Groups/GroupsModule.cs | 13 +++---------- .../Avatar/XmlRpcGroups/GroupsModule.cs | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 3336e940e0..2d5ebead8d 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs @@ -249,7 +249,8 @@ namespace OpenSim.Groups // There might be some problem with the thread we're generating this on but not // doing the update at this time causes problems (Mantis #7920 and #7915) // TODO: move sending this update to a later time in the rootification of the client. - SendAgentGroupDataUpdate(sp.ControllingClient, false); + if(!sp.isNPC) + SendAgentGroupDataUpdate(sp.ControllingClient, false); } private void OnMakeChild(ScenePresence sp) @@ -1265,11 +1266,6 @@ namespace OpenSim.Groups { if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name); - // NPCs currently don't have a CAPs structure or event queues. There is a strong argument for conveying this information - // to them anyway since it makes writing server-side bots a lot easier, but for now we don't do anything. - if (remoteClient.SceneAgent.PresenceType == PresenceType.Npc) - return; - // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff UUID agentID = GetRequestingAgentID(remoteClient); @@ -1278,10 +1274,7 @@ namespace OpenSim.Groups GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); IEventQueue eq = remoteClient.Scene.RequestModuleInterface(); - if (eq != null) - eq.GroupMembershipData(GetRequestingAgentID(remoteClient), dataForClientID, membershipArray); - else - remoteClient.SendGroupMembership(membershipArray); + eq.GroupMembershipData(GetRequestingAgentID(remoteClient), dataForClientID, membershipArray); remoteClient.RefreshGroupMembership(); } diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 62f863bc63..d6bf552140 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -271,7 +271,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // There might be some problem with the thread we're generating this on but not // doing the update at this time causes problems (Mantis #7920 and #7915) // TODO: move sending this update to a later time in the rootification of the client. - SendAgentGroupDataUpdate(sp.ControllingClient, false); + if(!sp.isNPC) + SendAgentGroupDataUpdate(sp.ControllingClient, false); } private void OnMakeChild(ScenePresence sp) @@ -1387,11 +1388,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name); - // NPCs currently don't have a CAPs structure or event queues. There is a strong argument for conveying this information - // to them anyway since it makes writing server-side bots a lot easier, but for now we don't do anything. - if (remoteClient.SceneAgent.PresenceType == PresenceType.Npc) - return; - // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff UUID agentID = GetRequestingAgentID(remoteClient); @@ -1400,10 +1396,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); IEventQueue eq = remoteClient.Scene.RequestModuleInterface(); - if (eq != null) - eq.GroupMembershipData(GetRequestingAgentID(remoteClient), dataForClientID, membershipArray); - else - remoteClient.SendGroupMembership(membershipArray); + eq.GroupMembershipData(GetRequestingAgentID(remoteClient), dataForClientID, membershipArray); remoteClient.RefreshGroupMembership(); }