make sure all new scenepresences have fresh groups information at creation time (grouptitle missing but not that needed at that point) (use direct calls exactly where we want things to happen), reusing a funtion name to rename later

LSLKeyTest
UbitUmarov 2016-08-04 21:36:41 +01:00
parent a66e747c95
commit e57d3edf6f
3 changed files with 25 additions and 2 deletions

View File

@ -1284,7 +1284,7 @@ namespace OpenSim.Groups
GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
remoteClient.RefreshGroupMembership(); remoteClient.UpdateGroupMembership(membershipArray);
remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray); remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray);
} }

View File

@ -13148,11 +13148,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
lock(m_groupPowers) lock(m_groupPowers)
{ {
GroupMembershipData activeMembership = null;
if (m_GroupsModule != null) if (m_GroupsModule != null)
{ {
GroupMembershipData[] GroupMembership = GroupMembershipData[] GroupMembership =
m_GroupsModule.GetMembershipData(AgentId); m_GroupsModule.GetMembershipData(AgentId);
m_groupPowers.Clear(); m_groupPowers.Clear();
if (GroupMembership != null) if (GroupMembership != null)
@ -13162,6 +13163,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers; 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;
} }
} }
} }

View File

@ -1094,6 +1094,8 @@ namespace OpenSim.Region.Framework.Scenes
m_LandingPointBehavior = LandingPointBehavior.SL; m_LandingPointBehavior = LandingPointBehavior.SL;
} }
ControllingClient.RefreshGroupMembership();
} }
private float lastHealthSent = 0; private float lastHealthSent = 0;