From 016e58e354e11825510e1c4bc534e275168577bc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Sep 2014 21:53:27 +0100 Subject: *test* --- OpenSim/Framework/ChildAgentDataUpdate.cs | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 91df64d..538e1b5 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs @@ -349,6 +349,8 @@ namespace OpenSim.Framework public List AttachmentObjects; public List AttachmentObjectStates; + public Dictionary MovementAnimationOverRides = new Dictionary(); + public virtual OSDMap Pack() { // m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); @@ -417,6 +419,21 @@ namespace OpenSim.Framework args["animation_state"] = AnimState.PackUpdateMessage(); } + if (MovementAnimationOverRides.Count > 0) + { + OSDArray AOs = new OSDArray(MovementAnimationOverRides.Count); + { + foreach (KeyValuePair kvp in MovementAnimationOverRides) + { + OSDMap ao = new OSDMap(2); + ao["state"] = OSD.FromString(kvp.Key); + ao["uuid"] = OSD.FromUUID(kvp.Value); + AOs.Add(ao); + } + } + args["movementAO"] = AOs; + } + if (Appearance != null) args["packed_appearance"] = Appearance.Pack(); @@ -640,6 +657,25 @@ namespace OpenSim.Framework } } + MovementAnimationOverRides.Clear(); + + if (args["movementAO"] != null && args["movementAO"].Type == OSDType.Array) + { + OSDArray AOs = (OSDArray)(args["movementAO"]); + int count = AOs.Count; + + for (int i = 0; i < count; i++) + { + OSDMap ao = (OSDMap)AOs[i]; + if (ao["state"] != null && ao["uuid"] != null) + { + string state = ao["state"].AsString(); + UUID id = ao["uuid"].AsUUID(); + MovementAnimationOverRides[state] = id; + } + } + } + //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array) //{ // OSDArray textures = (OSDArray)(args["agent_textures"]); -- cgit v1.1