aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
authorJeff Ames2007-12-10 15:08:44 +0000
committerJeff Ames2007-12-10 15:08:44 +0000
commit40fd37f95af68a213b0c3a465858c27fa7c8cfdf (patch)
tree27424718d3b777adee5088deecd813573223bc33 /OpenSim/Region/ClientStack/ClientView.cs
parentmore work on texture downloading. (diff)
downloadopensim-SC-40fd37f95af68a213b0c3a465858c27fa7c8cfdf.zip
opensim-SC-40fd37f95af68a213b0c3a465858c27fa7c8cfdf.tar.gz
opensim-SC-40fd37f95af68a213b0c3a465858c27fa7c8cfdf.tar.bz2
opensim-SC-40fd37f95af68a213b0c3a465858c27fa7c8cfdf.tar.xz
Refactored animation handling in ScenePresence. Now maintains a list of current animations.
* Fixes weirdness when typing and sitting at the same time * Should fix bug #32 (getting stuck in edit appearance pose) * Crouchwalk and possibly jump may need more looking into
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs23
1 files changed, 18 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 1a544b8..db25ee6 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -392,6 +392,7 @@ namespace OpenSim.Region.ClientStack
392 public event AgentSit OnAgentSit; 392 public event AgentSit OnAgentSit;
393 public event AvatarPickerRequest OnAvatarPickerRequest; 393 public event AvatarPickerRequest OnAvatarPickerRequest;
394 public event StartAnim OnStartAnim; 394 public event StartAnim OnStartAnim;
395 public event StopAnim OnStopAnim;
395 public event Action<IClientAPI> OnRequestAvatarsData; 396 public event Action<IClientAPI> OnRequestAvatarsData;
396 public event LinkObjects OnLinkObjects; 397 public event LinkObjects OnLinkObjects;
397 public event DelinkObjects OnDelinkObjects; 398 public event DelinkObjects OnDelinkObjects;
@@ -1265,7 +1266,7 @@ namespace OpenSim.Region.ClientStack
1265 OutPacket(avp, ThrottleOutPacketType.Task); 1266 OutPacket(avp, ThrottleOutPacketType.Task);
1266 } 1267 }
1267 1268
1268 public void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) 1269 public void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId)
1269 { 1270 {
1270 AvatarAnimationPacket ani = new AvatarAnimationPacket(); 1271 AvatarAnimationPacket ani = new AvatarAnimationPacket();
1271 ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1]; 1272 ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1];
@@ -1273,10 +1274,15 @@ namespace OpenSim.Region.ClientStack
1273 ani.AnimationSourceList[0].ObjectID = sourceAgentId; 1274 ani.AnimationSourceList[0].ObjectID = sourceAgentId;
1274 ani.Sender = new AvatarAnimationPacket.SenderBlock(); 1275 ani.Sender = new AvatarAnimationPacket.SenderBlock();
1275 ani.Sender.ID = sourceAgentId; 1276 ani.Sender.ID = sourceAgentId;
1276 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1]; 1277 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[animations.Length];
1277 ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock(); 1278
1278 ani.AnimationList[0].AnimID = animID; 1279 for (int i = 0; i < animations.Length; ++i)
1279 ani.AnimationList[0].AnimSequenceID = seq; 1280 {
1281 ani.AnimationList[i] = new AvatarAnimationPacket.AnimationListBlock();
1282 ani.AnimationList[i].AnimID = animations[i];
1283 ani.AnimationList[i].AnimSequenceID = seqs[i];
1284 }
1285
1280 OutPacket(ani, ThrottleOutPacketType.Task); 1286 OutPacket(ani, ThrottleOutPacketType.Task);
1281 } 1287 }
1282 1288
@@ -2485,6 +2491,13 @@ namespace OpenSim.Region.ClientStack
2485 OnStartAnim(this, AgentAni.AnimationList[i].AnimID, 1); 2491 OnStartAnim(this, AgentAni.AnimationList[i].AnimID, 1);
2486 } 2492 }
2487 } 2493 }
2494 else
2495 {
2496 if (OnStopAnim != null)
2497 {
2498 OnStopAnim(this, AgentAni.AnimationList[i].AnimID);
2499 }
2500 }
2488 } 2501 }
2489 break; 2502 break;
2490 case PacketType.AgentRequestSit: 2503 case PacketType.AgentRequestSit: