Add AnimState to CADU

integration
Melanie 2012-10-30 21:45:39 +01:00
parent 37de965233
commit 9e05067a4f
1 changed files with 36 additions and 0 deletions

View File

@ -306,6 +306,8 @@ namespace OpenSim.Framework
public AgentGroupData[] Groups; public AgentGroupData[] Groups;
public Animation[] Anims; public Animation[] Anims;
public Animation DefaultAnim = null;
public Animation AnimState = null;
public UUID GranterID; public UUID GranterID;
@ -390,6 +392,16 @@ namespace OpenSim.Framework
args["animations"] = anims; args["animations"] = anims;
} }
if (DefaultAnim != null)
{
args["default_animation"] = DefaultAnim.PackUpdateMessage();
}
if (AnimState != null)
{
args["animation_state"] = AnimState.PackUpdateMessage();
}
if (Appearance != null) if (Appearance != null)
args["packed_appearance"] = Appearance.Pack(); args["packed_appearance"] = Appearance.Pack();
@ -583,6 +595,30 @@ namespace OpenSim.Framework
} }
} }
if (args["default_animation"] != null)
{
try
{
DefaultAnim = new Animation((OSDMap)args["default_animation"]);
}
catch
{
DefaultAnim = null;
}
}
if (args["animation_state"] != null)
{
try
{
AnimState = new Animation((OSDMap)args["animation_state"]);
}
catch
{
AnimState = null;
}
}
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array) //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
//{ //{
// OSDArray textures = (OSDArray)(args["agent_textures"]); // OSDArray textures = (OSDArray)(args["agent_textures"]);