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.
This commit is contained in:
diva
2009-02-18 01:49:18 +00:00
parent c381bee515
commit 3f25128e77
8 changed files with 698 additions and 45 deletions

View File

@@ -26,6 +26,7 @@
*/
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Region.Framework.Scenes
{
@@ -62,5 +63,30 @@ namespace OpenSim.Region.Framework.Scenes
this.sequenceNum = sequenceNum;
this.objectID = objectID;
}
public Animation(OSDMap args)
{
UnpackUpdateMessage(args);
}
public OSDMap PackUpdateMessage()
{
OSDMap anim = new OSDMap();
anim["animation"] = OSD.FromUUID(animID);
anim["object_id"] = OSD.FromUUID(objectID);
anim["seq_num"] = OSD.FromInteger(sequenceNum);
return anim;
}
public void UnpackUpdateMessage(OSDMap args)
{
if (args["animation"] != null)
animID = args["animation"].AsUUID();
if (args["object_id"] != null)
objectID = args["object_id"].AsUUID();
if (args["seq_num"] != null)
sequenceNum = args["seq_num"].AsInteger();
}
}
}