aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation.cs
diff options
context:
space:
mode:
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}