aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation.cs
diff options
context:
space:
mode:
authordiva2009-02-18 01:49:18 +0000
committerdiva2009-02-18 01:49:18 +0000
commit3f25128e77af2a53e765436454b8fddeb8f88894 (patch)
tree461d17a9e357e262a08583789617749986978881 /OpenSim/Region/Framework/Scenes/Animation.cs
parentMakes SP.CopyFrom a bit more robust with respect to sims in older versions wh... (diff)
downloadopensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.zip
opensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.tar.gz
opensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.tar.bz2
opensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.tar.xz
Adds support for preserving animations on region crossings and TPs.
Known issue: after TP, the self client doesn't see the animations going, but others can see them. So there's a bug there (TPs only, crossings seem to be all fine). Untested: did not test animation overriders; only tested playing animations from the viewer.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation.cs b/OpenSim/Region/Framework/Scenes/Animation.cs
index 6f0681c..7c3e010 100644
--- a/OpenSim/Region/Framework/Scenes/Animation.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using OpenMetaverse; 28using OpenMetaverse;
29using OpenMetaverse.StructuredData;
29 30
30namespace OpenSim.Region.Framework.Scenes 31namespace OpenSim.Region.Framework.Scenes
31{ 32{
@@ -62,5 +63,30 @@ namespace OpenSim.Region.Framework.Scenes
62 this.sequenceNum = sequenceNum; 63 this.sequenceNum = sequenceNum;
63 this.objectID = objectID; 64 this.objectID = objectID;
64 } 65 }
66
67 public Animation(OSDMap args)
68 {
69 UnpackUpdateMessage(args);
70 }
71
72 public OSDMap PackUpdateMessage()
73 {
74 OSDMap anim = new OSDMap();
75 anim["animation"] = OSD.FromUUID(animID);
76 anim["object_id"] = OSD.FromUUID(objectID);
77 anim["seq_num"] = OSD.FromInteger(sequenceNum);
78 return anim;
79 }
80
81 public void UnpackUpdateMessage(OSDMap args)
82 {
83 if (args["animation"] != null)
84 animID = args["animation"].AsUUID();
85 if (args["object_id"] != null)
86 objectID = args["object_id"].AsUUID();
87 if (args["seq_num"] != null)
88 sequenceNum = args["seq_num"].AsInteger();
89 }
90
65 } 91 }
66} 92}