Set attachments to group and resume scripts for XmlRpcGroups
This commit is contained in:
@@ -824,6 +824,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
UUID agentID = GetRequestingAgentID(remoteClient);
|
||||
m_groupData.SetAgentActiveGroup(agentID, agentID, groupID);
|
||||
|
||||
ScenePresence sp = ((Scene)(remoteClient.Scene)).GetScenePresence(remoteClient.AgentId);
|
||||
List<SceneObjectGroup> attachments = sp.GetAttachments();
|
||||
|
||||
foreach(SceneObjectGroup so in attachments)
|
||||
{
|
||||
//m_log.DebugFormat("[GROUPS MODULE]: Setting new group and checking scripts to run in attachment {0} for {1}", so.Name, so.OwnerID);
|
||||
so.SetGroup(groupID, remoteClient);
|
||||
if (so.ContainsScripts() && so.RunningScriptCount() == 0)
|
||||
{
|
||||
so.RootPart.ParentGroup.CreateScriptInstances(
|
||||
0, false, sp.Scene.DefaultScriptEngine, sp.GetStateSource());
|
||||
so.ResumeScripts();
|
||||
}
|
||||
}
|
||||
|
||||
// llClientView does this
|
||||
SendAgentGroupDataUpdate(remoteClient, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user