Re-applied dalien patch (#175) and included bin\data with avataranimations.xml

Sugilite
lbsa71 2007-07-09 19:56:22 +00:00
parent 93f3ef7e0d
commit d91f33b87b
5 changed files with 60 additions and 4 deletions

View File

@ -147,6 +147,7 @@ namespace OpenSim.Framework.Interfaces
void OutPacket(Packet newPack); void OutPacket(Packet newPack);
void SendWearables(AvatarWearable[] wearables); void SendWearables(AvatarWearable[] wearables);
void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
void SendRegionHandshake(RegionInfo regionInfo); void SendRegionHandshake(RegionInfo regionInfo);
void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);

View File

@ -528,6 +528,21 @@ namespace OpenSim.Region.ClientStack
OutPacket(avp); OutPacket(avp);
} }
public void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId)
{
AvatarAnimationPacket ani = new AvatarAnimationPacket();
ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1];
ani.AnimationSourceList[0] = new AvatarAnimationPacket.AnimationSourceListBlock();
ani.AnimationSourceList[0].ObjectID = sourceAgentId;
ani.Sender = new AvatarAnimationPacket.SenderBlock();
ani.Sender.ID = sourceAgentId;
ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1];
ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock();
ani.AnimationList[0].AnimID = animID;
ani.AnimationList[0].AnimSequenceID = seq;
this.OutPacket(ani);
}
#endregion #endregion
#region Avatar Packet/data sending Methods #region Avatar Packet/data sending Methods

View File

@ -122,6 +122,8 @@ namespace OpenSim.Region.Environment.Scenes
} }
Wearables = AvatarWearable.DefaultWearables; Wearables = AvatarWearable.DefaultWearables;
Animations = new ScenePresence.AvatarAnimations();
Animations.LoadAnims();
this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
@ -274,9 +276,27 @@ namespace OpenSim.Region.Environment.Scenes
{ {
this.AddNewMovement(agent_control_v3, q); this.AddNewMovement(agent_control_v3, q);
} }
UpdateMovementAnimations(update_movementflag);
}
protected void UpdateMovementAnimations(bool update_movementflag)
{
if (update_movementflag)
{
if (movementflag != 0) {
if (this._physActor.Flying) {
this.SendAnimPack(Animations.AnimsLLUUID["FLY"], 1);
} else {
this.SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
}
} else {
this.SendAnimPack(Animations.AnimsLLUUID["STAND"], 1);
}
}
} }
protected void AddNewMovement(Vector3 vec, Quaternion rotation) protected void AddNewMovement(Vector3 vec, Quaternion rotation)
{ {
NewForce newVelocity = new NewForce(); NewForce newVelocity = new NewForce();
@ -403,8 +423,13 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="seq"></param> /// <param name="seq"></param>
public void SendAnimPack(LLUUID animID, int seq) public void SendAnimPack(LLUUID animID, int seq)
{ {
this.current_anim = animID;
this.anim_seq = anim_seq;
List<ScenePresence> avatars = this.m_world.RequestAvatarList();
for (int i = 0; i < avatars.Count; i++)
{
avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId);
}
} }
/// <summary> /// <summary>
@ -412,7 +437,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void SendAnimPack() public void SendAnimPack()
{ {
this.SendAnimPack(this.current_anim, this.anim_seq);
} }
#endregion #endregion

View File

@ -0,0 +1,5 @@
Not all of the files in this directory are licensed under the BSD license. Some of these files come with the Second Life viewer and are considered licensed under a Creative Commons License.
These files are:
- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License)

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Copyright(C) 2002-2007 Linden Lab, OpenSim Developers -->
<!-- Based on viewerart.ini packaged with the viewer. -->
<!-- This file is a derivative work of the above while it contains default animation UUIDs -->
<!-- Licensed under a creative commons license (By-SA) http://creativecommons.org/licenses/by-sa/2.5/ -->
<animations>
<animation name="STAND">2408fe9e-df1d-1d7d-f4ff-1384fa7b350f</animation>
<animation name="WALK">6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0</animation>
<animation name="FLY">aec4610c-757f-bc4e-c092-c6e9caf18daf</animation>
</animations>