mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Assume childreen don't need to know caps seeds
This commit is contained in:
@@ -355,6 +355,7 @@ namespace OpenSim.Framework
|
||||
public UUID ActiveGroupID;
|
||||
|
||||
public AgentGroupData[] Groups;
|
||||
public Dictionary<ulong, string> 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<ulong, string> 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<ulong, string>();
|
||||
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"]);
|
||||
|
||||
Reference in New Issue
Block a user