aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-10-17 14:07:11 +0100
committerUbitUmarov2014-10-17 14:07:11 +0100
commit2bea66ed27d86ddd7f34ee1e7d0292ae4f1c5644 (patch)
tree41fccb44944dd67bd3aa31a251ebfc6f7929c840 /OpenSim
parent send correct caps seed on CreateAgent to a nearby region (diff)
downloadopensim-SC_OLD-2bea66ed27d86ddd7f34ee1e7d0292ae4f1c5644.zip
opensim-SC_OLD-2bea66ed27d86ddd7f34ee1e7d0292ae4f1c5644.tar.gz
opensim-SC_OLD-2bea66ed27d86ddd7f34ee1e7d0292ae4f1c5644.tar.bz2
opensim-SC_OLD-2bea66ed27d86ddd7f34ee1e7d0292ae4f1c5644.tar.xz
send motion control state in update to childs. Reset CollisionPlane on
makechild
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs11
2 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 538e1b5..5078f69 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -320,6 +320,7 @@ namespace OpenSim.Framework
320 public Animation[] Anims; 320 public Animation[] Anims;
321 public Animation DefaultAnim = null; 321 public Animation DefaultAnim = null;
322 public Animation AnimState = null; 322 public Animation AnimState = null;
323 public Byte MotionState = 0;
323 324
324 public UUID GranterID; 325 public UUID GranterID;
325 public UUID ParentPart; 326 public UUID ParentPart;
@@ -434,6 +435,11 @@ namespace OpenSim.Framework
434 args["movementAO"] = AOs; 435 args["movementAO"] = AOs;
435 } 436 }
436 437
438 if (MotionState != 0)
439 {
440 args["motion_state"] = OSD.FromInteger(MotionState);
441 }
442
437 if (Appearance != null) 443 if (Appearance != null)
438 args["packed_appearance"] = Appearance.Pack(); 444 args["packed_appearance"] = Appearance.Pack();
439 445
@@ -676,6 +682,9 @@ namespace OpenSim.Framework
676 } 682 }
677 } 683 }
678 684
685 if (args.ContainsKey("motion_state"))
686 MotionState = (byte)args["motion_state"].AsInteger();
687
679 //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array) 688 //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
680 //{ 689 //{
681 // OSDArray textures = (OSDArray)(args["agent_textures"]); 690 // OSDArray textures = (OSDArray)(args["agent_textures"]);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index dbeba9a..3509ae7 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1313,7 +1313,9 @@ namespace OpenSim.Region.Framework.Scenes
1313 m_currentParcelHide = false; 1313 m_currentParcelHide = false;
1314 m_currentParcelUUID = UUID.Zero; 1314 m_currentParcelUUID = UUID.Zero;
1315 // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into 1315 // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into
1316 1316
1317 CollisionPlane = Vector4.UnitW;
1318
1317 m_scene.EventManager.TriggerOnMakeChildAgent(this); 1319 m_scene.EventManager.TriggerOnMakeChildAgent(this);
1318 } 1320 }
1319 1321
@@ -1659,7 +1661,7 @@ namespace OpenSim.Region.Framework.Scenes
1659 client.Name, Scene.Name, AbsolutePosition); 1661 client.Name, Scene.Name, AbsolutePosition);
1660 1662
1661 m_inTransit = true; 1663 m_inTransit = true;
1662 bool newhide = false; 1664
1663 try 1665 try
1664 { 1666 {
1665 // Make sure it's not a login agent. We don't want to wait for updates during login 1667 // 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
1805 SendAppearanceToAgent(this); 1807 SendAppearanceToAgent(this);
1806 1808
1807 // send this animations 1809 // send this animations
1810
1808 UUID[] animIDs = null; 1811 UUID[] animIDs = null;
1809 int[] animseqs = null; 1812 int[] animseqs = null;
1810 UUID[] animsobjs = null; 1813 UUID[] animsobjs = null;
@@ -4222,6 +4225,8 @@ namespace OpenSim.Region.Framework.Scenes
4222 4225
4223 cAgent.MovementAnimationOverRides = Overrides.CloneAOPairs(); 4226 cAgent.MovementAnimationOverRides = Overrides.CloneAOPairs();
4224 4227
4228 cAgent.MotionState = (byte)Animator.currentControlState;
4229
4225 if (Scene.AttachmentsModule != null) 4230 if (Scene.AttachmentsModule != null)
4226 Scene.AttachmentsModule.CopyAttachments(this, cAgent); 4231 Scene.AttachmentsModule.CopyAttachments(this, cAgent);
4227 } 4232 }
@@ -4305,6 +4310,8 @@ namespace OpenSim.Region.Framework.Scenes
4305 Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero); 4310 Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero);
4306 if (cAgent.Anims != null) 4311 if (cAgent.Anims != null)
4307 Animator.Animations.FromArray(cAgent.Anims); 4312 Animator.Animations.FromArray(cAgent.Anims);
4313 if (cAgent.MotionState != 0)
4314 Animator.currentControlState = (ScenePresenceAnimator.motionControlStates) cAgent.MotionState;
4308 4315
4309 if (Scene.AttachmentsModule != null) 4316 if (Scene.AttachmentsModule != null)
4310 Scene.AttachmentsModule.CopyAttachments(cAgent, this); 4317 Scene.AttachmentsModule.CopyAttachments(cAgent, this);