aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs1
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs33
-rw-r--r--bin/data/LICENSE-README-IMPORTANT.txt5
-rw-r--r--bin/data/avataranimations.xml10
5 files changed, 60 insertions, 4 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index 7042f40..7bc8d14 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -147,6 +147,7 @@ namespace OpenSim.Framework.Interfaces
147 147
148 void OutPacket(Packet newPack); 148 void OutPacket(Packet newPack);
149 void SendWearables(AvatarWearable[] wearables); 149 void SendWearables(AvatarWearable[] wearables);
150 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
150 void SendRegionHandshake(RegionInfo regionInfo); 151 void SendRegionHandshake(RegionInfo regionInfo);
151 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 152 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
152 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 153 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 5866b45..48d5b9d 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -528,6 +528,21 @@ namespace OpenSim.Region.ClientStack
528 OutPacket(avp); 528 OutPacket(avp);
529 } 529 }
530 530
531 public void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId)
532 {
533 AvatarAnimationPacket ani = new AvatarAnimationPacket();
534 ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1];
535 ani.AnimationSourceList[0] = new AvatarAnimationPacket.AnimationSourceListBlock();
536 ani.AnimationSourceList[0].ObjectID = sourceAgentId;
537 ani.Sender = new AvatarAnimationPacket.SenderBlock();
538 ani.Sender.ID = sourceAgentId;
539 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1];
540 ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock();
541 ani.AnimationList[0].AnimID = animID;
542 ani.AnimationList[0].AnimSequenceID = seq;
543 this.OutPacket(ani);
544 }
545
531 #endregion 546 #endregion
532 547
533 #region Avatar Packet/data sending Methods 548 #region Avatar Packet/data sending Methods
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index d335699..b0e7710 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -122,6 +122,8 @@ namespace OpenSim.Region.Environment.Scenes
122 } 122 }
123 123
124 Wearables = AvatarWearable.DefaultWearables; 124 Wearables = AvatarWearable.DefaultWearables;
125 Animations = new ScenePresence.AvatarAnimations();
126 Animations.LoadAnims();
125 127
126 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); 128 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
127 129
@@ -274,9 +276,27 @@ namespace OpenSim.Region.Environment.Scenes
274 { 276 {
275 this.AddNewMovement(agent_control_v3, q); 277 this.AddNewMovement(agent_control_v3, q);
276 } 278 }
277 279 UpdateMovementAnimations(update_movementflag);
278 } 280 }
279 281
282 protected void UpdateMovementAnimations(bool update_movementflag)
283 {
284 if (update_movementflag)
285 {
286 if (movementflag != 0) {
287 if (this._physActor.Flying) {
288 this.SendAnimPack(Animations.AnimsLLUUID["FLY"], 1);
289 } else {
290 this.SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
291 }
292 } else {
293 this.SendAnimPack(Animations.AnimsLLUUID["STAND"], 1);
294 }
295 }
296
297 }
298
299
280 protected void AddNewMovement(Vector3 vec, Quaternion rotation) 300 protected void AddNewMovement(Vector3 vec, Quaternion rotation)
281 { 301 {
282 NewForce newVelocity = new NewForce(); 302 NewForce newVelocity = new NewForce();
@@ -403,8 +423,13 @@ namespace OpenSim.Region.Environment.Scenes
403 /// <param name="seq"></param> 423 /// <param name="seq"></param>
404 public void SendAnimPack(LLUUID animID, int seq) 424 public void SendAnimPack(LLUUID animID, int seq)
405 { 425 {
406 426 this.current_anim = animID;
407 427 this.anim_seq = anim_seq;
428 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
429 for (int i = 0; i < avatars.Count; i++)
430 {
431 avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId);
432 }
408 } 433 }
409 434
410 /// <summary> 435 /// <summary>
@@ -412,7 +437,7 @@ namespace OpenSim.Region.Environment.Scenes
412 /// </summary> 437 /// </summary>
413 public void SendAnimPack() 438 public void SendAnimPack()
414 { 439 {
415 440 this.SendAnimPack(this.current_anim, this.anim_seq);
416 } 441 }
417 #endregion 442 #endregion
418 443
diff --git a/bin/data/LICENSE-README-IMPORTANT.txt b/bin/data/LICENSE-README-IMPORTANT.txt
new file mode 100644
index 0000000..3229102
--- /dev/null
+++ b/bin/data/LICENSE-README-IMPORTANT.txt
@@ -0,0 +1,5 @@
1Not 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.
2
3These files are:
4
5- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) \ No newline at end of file
diff --git a/bin/data/avataranimations.xml b/bin/data/avataranimations.xml
new file mode 100644
index 0000000..461613f
--- /dev/null
+++ b/bin/data/avataranimations.xml
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!-- Copyright(C) 2002-2007 Linden Lab, OpenSim Developers -->
3<!-- Based on viewerart.ini packaged with the viewer. -->
4<!-- This file is a derivative work of the above while it contains default animation UUIDs -->
5<!-- Licensed under a creative commons license (By-SA) http://creativecommons.org/licenses/by-sa/2.5/ -->
6<animations>
7 <animation name="STAND">2408fe9e-df1d-1d7d-f4ff-1384fa7b350f</animation>
8 <animation name="WALK">6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0</animation>
9 <animation name="FLY">aec4610c-757f-bc4e-c092-c6e9caf18daf</animation>
10</animations> \ No newline at end of file