From afa9b4a002f0cc929d60e1770535eefcdefe3a43 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 20 Oct 2014 09:14:27 +0100 Subject: Assume childreen don't need to know caps seeds --- OpenSim/Framework/ChildAgentDataUpdate.cs | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 0763bbc..a714d86 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs @@ -355,6 +355,7 @@ namespace OpenSim.Framework public UUID ActiveGroupID; public AgentGroupData[] Groups; + public Dictionary ChildrenCapSeeds = null; public Animation[] Anims; public Animation DefaultAnim = null; public Animation AnimState = null; @@ -440,6 +441,19 @@ namespace OpenSim.Framework args["groups"] = groups; } + if (ChildrenCapSeeds != null && ChildrenCapSeeds.Count > 0) + { + OSDArray childrenSeeds = new OSDArray(ChildrenCapSeeds.Count); + foreach (KeyValuePair kvp in ChildrenCapSeeds) + { + OSDMap pair = new OSDMap(); + pair["handle"] = OSD.FromString(kvp.Key.ToString()); + pair["seed"] = OSD.FromString(kvp.Value); + childrenSeeds.Add(pair); + } + args["children_seeds"] = childrenSeeds; + } + if ((Anims != null) && (Anims.Length > 0)) { OSDArray anims = new OSDArray(Anims.Length); @@ -663,6 +677,29 @@ namespace OpenSim.Framework } } + if (args.ContainsKey("children_seeds") && (args["children_seeds"] != null) && + (args["children_seeds"].Type == OSDType.Array)) + { + OSDArray childrenSeeds = (OSDArray)(args["children_seeds"]); + ChildrenCapSeeds = new Dictionary(); + foreach (OSD o in childrenSeeds) + { + if (o.Type == OSDType.Map) + { + ulong handle = 0; + string seed = ""; + OSDMap pair = (OSDMap)o; + if (pair["handle"] != null) + if (!UInt64.TryParse(pair["handle"].AsString(), out handle)) + continue; + if (pair["seed"] != null) + seed = pair["seed"].AsString(); + if (!ChildrenCapSeeds.ContainsKey(handle)) + ChildrenCapSeeds.Add(handle, seed); + } + } + } + if ((args["animations"] != null) && (args["animations"]).Type == OSDType.Array) { OSDArray anims = (OSDArray)(args["animations"]); -- cgit v1.1