aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorlbsa712007-07-09 19:56:22 +0000
committerlbsa712007-07-09 19:56:22 +0000
commitd91f33b87b4578eb5e5a9ef22f383ed598cc28e2 (patch)
treefdadd7c575131ff282ce301b419ae58bd62502fc /OpenSim/Region/Environment/Scenes
parentDone a little bit of renaming in primitive.cs and on a few events in IClientAPI. (diff)
downloadopensim-SC-d91f33b87b4578eb5e5a9ef22f383ed598cc28e2.zip
opensim-SC-d91f33b87b4578eb5e5a9ef22f383ed598cc28e2.tar.gz
opensim-SC-d91f33b87b4578eb5e5a9ef22f383ed598cc28e2.tar.bz2
opensim-SC-d91f33b87b4578eb5e5a9ef22f383ed598cc28e2.tar.xz
Re-applied dalien patch (#175) and included bin\data with avataranimations.xml
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs33
1 files changed, 29 insertions, 4 deletions
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