diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index b6bf5f1711..73fc22ce4e 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs @@ -1284,7 +1284,7 @@ namespace OpenSim.Groups GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); - remoteClient.RefreshGroupMembership(); + remoteClient.UpdateGroupMembership(membershipArray); remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray); } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 26fc85e7fe..25ecc96395 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -13148,11 +13148,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP { lock(m_groupPowers) { + GroupMembershipData activeMembership = null; if (m_GroupsModule != null) { GroupMembershipData[] GroupMembership = m_GroupsModule.GetMembershipData(AgentId); - + m_groupPowers.Clear(); if (GroupMembership != null) @@ -13162,6 +13163,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers; } } + + activeMembership = m_GroupsModule.GetActiveMembershipData(AgentId); + if(activeMembership != null) + { + if(!m_groupPowers.ContainsKey(activeMembership.GroupID)) + activeMembership = null; + else + { + m_activeGroupID = activeMembership.GroupID; + m_activeGroupName = activeMembership.GroupName; + m_activeGroupPowers = ActiveGroupPowers; + } + } + } + + if(activeMembership == null) + { + m_activeGroupID = UUID.Zero; + m_activeGroupName = ""; + m_activeGroupPowers = 0; } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c55d904535..90b0f381b4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1094,6 +1094,8 @@ namespace OpenSim.Region.Framework.Scenes m_LandingPointBehavior = LandingPointBehavior.SL; } + ControllingClient.RefreshGroupMembership(); + } private float lastHealthSent = 0;