diff --git a/libsecondlife-cs/Avatar.cs b/libsecondlife-cs/Avatar.cs index d0531ab2..70a89dd8 100644 --- a/libsecondlife-cs/Avatar.cs +++ b/libsecondlife-cs/Avatar.cs @@ -545,6 +545,32 @@ namespace libsecondlife Client.Network.SendPacket((Packet)money); } + /// + /// Send an AgentAnimation packet that will toggle animations on or off + /// + /// A list of animation UUIDs, and whether to + /// turn that animation on or off + public void Animate(Dictionary animations) + { + AgentAnimationPacket animate = new AgentAnimationPacket(); + + animate.AgentData.AgentID = Client.Network.AgentID; + animate.AgentData.SessionID = Client.Network.SessionID; + animate.AnimationList = new AgentAnimationPacket.AnimationListBlock[animations.Count]; + int i = 0; + + foreach (KeyValuePair animation in animations) + { + animate.AnimationList[i] = new AgentAnimationPacket.AnimationListBlock(); + animate.AnimationList[i].AnimID = animation.Key; + animate.AnimationList[i].StartAnim = animation.Value; + + i++; + } + + Client.Network.SendPacket(animate); + } + /// /// Use the autopilot sim function to move the avatar to a new position /// diff --git a/libsecondlife-cs/ObjectManager.cs b/libsecondlife-cs/ObjectManager.cs index a4680ecc..861b28c5 100644 --- a/libsecondlife-cs/ObjectManager.cs +++ b/libsecondlife-cs/ObjectManager.cs @@ -51,6 +51,8 @@ namespace libsecondlife public LLQuaternion Rotation; /// public LLVector3 RotationVelocity; + /// + public TextureEntry Textures; } /// @@ -75,6 +77,8 @@ namespace libsecondlife public LLQuaternion Rotation; /// public LLVector3 RotationVelocity; + /// + public TextureEntry Textures; } /// @@ -783,6 +787,7 @@ namespace libsecondlife avupdate.Acceleration = Acceleration; avupdate.Rotation = Rotation; avupdate.RotationVelocity = RotationVelocity; + avupdate.Textures = new TextureEntry(block.TextureEntry, 0, block.TextureEntry.Length); if (OnAvatarMoved != null) { @@ -804,6 +809,7 @@ namespace libsecondlife primupdate.Acceleration = Acceleration; primupdate.Rotation = Rotation; primupdate.RotationVelocity = RotationVelocity; + primupdate.Textures = new TextureEntry(block.TextureEntry, 0, block.TextureEntry.Length); if (OnPrimMoved != null) {