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 DefaultAnim = null;
public Animation AnimState = null;
public Byte MotionState = 0;
public UUID GranterID;
public UUID ParentPart;
@ -434,6 +435,11 @@ namespace OpenSim.Framework
args["movementAO"] = AOs;
}
if (MotionState != 0)
{
args["motion_state"] = OSD.FromInteger(MotionState);
}
if (Appearance != null)
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)
//{
// OSDArray textures = (OSDArray)(args["agent_textures"]);

View File

@ -1314,6 +1314,8 @@ namespace OpenSim.Region.Framework.Scenes
m_currentParcelUUID = UUID.Zero;
// FIXME: Set RegionHandle to the region handle of the scene this agent is moving into
CollisionPlane = Vector4.UnitW;
m_scene.EventManager.TriggerOnMakeChildAgent(this);
}
@ -1659,7 +1661,7 @@ namespace OpenSim.Region.Framework.Scenes
client.Name, Scene.Name, AbsolutePosition);
m_inTransit = true;
bool newhide = false;
try
{
// 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);
// send this animations
UUID[] animIDs = null;
int[] animseqs = null;
UUID[] animsobjs = null;
@ -4222,6 +4225,8 @@ namespace OpenSim.Region.Framework.Scenes
cAgent.MovementAnimationOverRides = Overrides.CloneAOPairs();
cAgent.MotionState = (byte)Animator.currentControlState;
if (Scene.AttachmentsModule != null)
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);
if (cAgent.Anims != null)
Animator.Animations.FromArray(cAgent.Anims);
if (cAgent.MotionState != 0)
Animator.currentControlState = (ScenePresenceAnimator.motionControlStates) cAgent.MotionState;
if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(cAgent, this);