mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Store and send the current movement animation state to a new sim on crossing
This commit is contained in:
@@ -3075,6 +3075,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
cAgent.Anims = Animator.Animations.ToArray();
|
||||
}
|
||||
catch { }
|
||||
cAgent.DefaultAnim = Animator.Animations.DefaultAnimation;
|
||||
cAgent.AnimState = Animator.Animations.ImplicitDefaultAnimation;
|
||||
|
||||
if (Scene.AttachmentsModule != null)
|
||||
Scene.AttachmentsModule.CopyAttachments(this, cAgent);
|
||||
@@ -3146,6 +3148,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// FIXME: Why is this null check necessary? Where are the cases where we get a null Anims object?
|
||||
if (cAgent.Anims != null)
|
||||
Animator.Animations.FromArray(cAgent.Anims);
|
||||
if (cAgent.DefaultAnim != null)
|
||||
Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero);
|
||||
if (cAgent.AnimState != null)
|
||||
Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero);
|
||||
|
||||
if (Scene.AttachmentsModule != null)
|
||||
Scene.AttachmentsModule.CopyAttachments(cAgent, this);
|
||||
|
||||
Reference in New Issue
Block a user