mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user