aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs128
1 files changed, 64 insertions, 64 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 3f70108..94dbbb3 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment.Scenes
270 } 270 }
271 271
272 m_pos = value; 272 m_pos = value;
273 m_parentPosition=new LLVector3(0, 0, 0); 273 m_parentPosition=new LLVector3(0, 0, 0);
274 } 274 }
275 } 275 }
276 276
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Scenes
362 // Move them into an object to (hopefully) avoid threading issues. 362 // Move them into an object to (hopefully) avoid threading issues.
363 try 363 try
364 { 364 {
365 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); 365 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
366 } 366 }
367 catch (KeyNotFoundException) 367 catch (KeyNotFoundException)
368 { 368 {
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes
547 547
548 AddToPhysicalScene(); 548 AddToPhysicalScene();
549 m_physicsActor.Flying = isFlying; 549 m_physicsActor.Flying = isFlying;
550 SendAnimPack(); 550 SendAnimPack();
551 551
552 m_scene.SwapRootAgentCount(false); 552 m_scene.SwapRootAgentCount(false);
553 m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); 553 m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid);
@@ -570,15 +570,15 @@ namespace OpenSim.Region.Environment.Scenes
570 /// </summary> 570 /// </summary>
571 public void MakeChildAgent() 571 public void MakeChildAgent()
572 { 572 {
573 if(m_animations.Count > 0) 573 if(m_animations.Count > 0)
574 { 574 {
575 LLUUID movement=m_animations[0]; 575 LLUUID movement=m_animations[0];
576 576
577 m_animations.Clear(); 577 m_animations.Clear();
578 m_animationSeqs.Clear(); 578 m_animationSeqs.Clear();
579 579
580 SetMovementAnimation(movement); 580 SetMovementAnimation(movement);
581 } 581 }
582// m_log.DebugFormat( 582// m_log.DebugFormat(
583// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", 583// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}",
584// Name, UUID, m_scene.RegionInfo.RegionName); 584// Name, UUID, m_scene.RegionInfo.RegionName);
@@ -611,10 +611,10 @@ namespace OpenSim.Region.Environment.Scenes
611 /// <param name="pos"></param> 611 /// <param name="pos"></param>
612 public void Teleport(LLVector3 pos) 612 public void Teleport(LLVector3 pos)
613 { 613 {
614 RemoveFromPhysicalScene(); 614 RemoveFromPhysicalScene();
615 Velocity = new LLVector3(0, 0, 0); 615 Velocity = new LLVector3(0, 0, 0);
616 AbsolutePosition = pos; 616 AbsolutePosition = pos;
617 AddToPhysicalScene(); 617 AddToPhysicalScene();
618 SendTerseUpdateToAllClients(); 618 SendTerseUpdateToAllClients();
619 } 619 }
620 620
@@ -1055,12 +1055,12 @@ namespace OpenSim.Region.Environment.Scenes
1055 1055
1056 public void AddAnimation(LLUUID animID) 1056 public void AddAnimation(LLUUID animID)
1057 { 1057 {
1058 if(m_isChildAgent) 1058 if(m_isChildAgent)
1059 return; 1059 return;
1060 1060
1061 // Don't let this animation become the movement animation 1061 // Don't let this animation become the movement animation
1062 if(m_animations.Count < 1) 1062 if(m_animations.Count < 1)
1063 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); 1063 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
1064 1064
1065 if (!m_animations.Contains(animID)) 1065 if (!m_animations.Contains(animID))
1066 { 1066 {
@@ -1072,8 +1072,8 @@ namespace OpenSim.Region.Environment.Scenes
1072 1072
1073 public void RemoveAnimation(LLUUID animID) 1073 public void RemoveAnimation(LLUUID animID)
1074 { 1074 {
1075 if(m_isChildAgent) 1075 if(m_isChildAgent)
1076 return; 1076 return;
1077 1077
1078 if (m_animations.Contains(animID)) 1078 if (m_animations.Contains(animID))
1079 { 1079 {
@@ -1083,21 +1083,21 @@ namespace OpenSim.Region.Environment.Scenes
1083 } 1083 }
1084 else 1084 else
1085 { 1085 {
1086 // What a HACK!! Anim list really needs to be an object! 1086 // What a HACK!! Anim list really needs to be an object!
1087 int idx; 1087 int idx;
1088 1088
1089 for(idx=0;idx < m_animations.Count;idx++) 1089 for(idx=0;idx < m_animations.Count;idx++)
1090 { 1090 {
1091 if(m_animations[idx] == animID) 1091 if(m_animations[idx] == animID)
1092 { 1092 {
1093 int seq=m_animationSeqs[idx]; 1093 int seq=m_animationSeqs[idx];
1094 1094
1095 m_animations.Remove(animID); 1095 m_animations.Remove(animID);
1096 m_animationSeqs.Remove(seq); 1096 m_animationSeqs.Remove(seq);
1097 SendAnimPack(); 1097 SendAnimPack();
1098 break; 1098 break;
1099 } 1099 }
1100 } 1100 }
1101 } 1101 }
1102 } 1102 }
1103 } 1103 }
@@ -1119,33 +1119,33 @@ namespace OpenSim.Region.Environment.Scenes
1119 /// </summary> 1119 /// </summary>
1120 protected void SetMovementAnimation(LLUUID anim) 1120 protected void SetMovementAnimation(LLUUID anim)
1121 { 1121 {
1122 if(m_animations.Count < 1) 1122 if(m_animations.Count < 1)
1123 { 1123 {
1124 m_animations.Add(Animations.AnimsLLUUID["STAND"]); 1124 m_animations.Add(Animations.AnimsLLUUID["STAND"]);
1125 m_animationSeqs.Add(1); 1125 m_animationSeqs.Add(1);
1126 1126
1127 SendAnimPack(); 1127 SendAnimPack();
1128 } 1128 }
1129 else 1129 else
1130 { 1130 {
1131 try 1131 try
1132 { 1132 {
1133 if (m_animations[0] != anim) 1133 if (m_animations[0] != anim)
1134 { 1134 {
1135 m_animations[0] = anim; 1135 m_animations[0] = anim;
1136 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber; 1136 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber;
1137 } 1137 }
1138 SendAnimPack(); 1138 SendAnimPack();
1139 } 1139 }
1140 catch 1140 catch
1141 { 1141 {
1142 m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery..."); 1142 m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery...");
1143 m_animations[0] = anim; 1143 m_animations[0] = anim;
1144 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber; 1144 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber;
1145 SendAnimPack(); 1145 SendAnimPack();
1146 } 1146 }
1147 } 1147 }
1148 } 1148 }
1149 1149
1150 /// <summary> 1150 /// <summary>
1151 /// This method handles agent movement related animations 1151 /// This method handles agent movement related animations
@@ -1536,8 +1536,8 @@ namespace OpenSim.Region.Environment.Scenes
1536 /// <param name="seqs"></param> 1536 /// <param name="seqs"></param>
1537 public void SendAnimPack(LLUUID[] animations, int[] seqs) 1537 public void SendAnimPack(LLUUID[] animations, int[] seqs)
1538 { 1538 {
1539 if(m_isChildAgent) 1539 if(m_isChildAgent)
1540 return; 1540 return;
1541 1541
1542 m_scene.Broadcast( 1542 m_scene.Broadcast(
1543 delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); }); 1543 delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); });