send motion control state in update to childs. Reset CollisionPlane on

makechild
avinationmerge
UbitUmarov 2014-10-17 14:07:11 +01:00
parent e99fea3398
commit 2bea66ed27
2 changed files with 18 additions and 2 deletions

View File

@ -320,6 +320,7 @@ namespace OpenSim.Framework
public Animation[] Anims; public Animation[] Anims;
public Animation DefaultAnim = null; public Animation DefaultAnim = null;
public Animation AnimState = null; public Animation AnimState = null;
public Byte MotionState = 0;
public UUID GranterID; public UUID GranterID;
public UUID ParentPart; public UUID ParentPart;
@ -434,6 +435,11 @@ namespace OpenSim.Framework
args["movementAO"] = AOs; args["movementAO"] = AOs;
} }
if (MotionState != 0)
{
args["motion_state"] = OSD.FromInteger(MotionState);
}
if (Appearance != null) if (Appearance != null)
args["packed_appearance"] = Appearance.Pack(); args["packed_appearance"] = Appearance.Pack();
@ -676,6 +682,9 @@ namespace OpenSim.Framework
} }
} }
if (args.ContainsKey("motion_state"))
MotionState = (byte)args["motion_state"].AsInteger();
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array) //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
//{ //{
// OSDArray textures = (OSDArray)(args["agent_textures"]); // OSDArray textures = (OSDArray)(args["agent_textures"]);

View File

@ -1314,6 +1314,8 @@ namespace OpenSim.Region.Framework.Scenes
m_currentParcelUUID = UUID.Zero; m_currentParcelUUID = UUID.Zero;
// FIXME: Set RegionHandle to the region handle of the scene this agent is moving into // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into
CollisionPlane = Vector4.UnitW;
m_scene.EventManager.TriggerOnMakeChildAgent(this); m_scene.EventManager.TriggerOnMakeChildAgent(this);
} }
@ -1659,7 +1661,7 @@ namespace OpenSim.Region.Framework.Scenes
client.Name, Scene.Name, AbsolutePosition); client.Name, Scene.Name, AbsolutePosition);
m_inTransit = true; m_inTransit = true;
bool newhide = false;
try try
{ {
// Make sure it's not a login agent. We don't want to wait for updates during login // Make sure it's not a login agent. We don't want to wait for updates during login
@ -1805,6 +1807,7 @@ namespace OpenSim.Region.Framework.Scenes
SendAppearanceToAgent(this); SendAppearanceToAgent(this);
// send this animations // send this animations
UUID[] animIDs = null; UUID[] animIDs = null;
int[] animseqs = null; int[] animseqs = null;
UUID[] animsobjs = null; UUID[] animsobjs = null;
@ -4222,6 +4225,8 @@ namespace OpenSim.Region.Framework.Scenes
cAgent.MovementAnimationOverRides = Overrides.CloneAOPairs(); cAgent.MovementAnimationOverRides = Overrides.CloneAOPairs();
cAgent.MotionState = (byte)Animator.currentControlState;
if (Scene.AttachmentsModule != null) if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(this, cAgent); Scene.AttachmentsModule.CopyAttachments(this, cAgent);
} }
@ -4305,6 +4310,8 @@ namespace OpenSim.Region.Framework.Scenes
Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero); Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero);
if (cAgent.Anims != null) if (cAgent.Anims != null)
Animator.Animations.FromArray(cAgent.Anims); Animator.Animations.FromArray(cAgent.Anims);
if (cAgent.MotionState != 0)
Animator.currentControlState = (ScenePresenceAnimator.motionControlStates) cAgent.MotionState;
if (Scene.AttachmentsModule != null) if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(cAgent, this); Scene.AttachmentsModule.CopyAttachments(cAgent, this);