aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEventQueue.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs148
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs64
3 files changed, 169 insertions, 45 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
index 7af56cb..7edd75a 100644
--- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Framework.Interfaces
39 bool Enqueue(OSD o, UUID avatarID); 39 bool Enqueue(OSD o, UUID avatarID);
40 40
41 // These are required to decouple Scenes from EventQueueHelper 41 // These are required to decouple Scenes from EventQueueHelper
42 void DisableSimulator(ulong handle, UUID avatarID); 42// void DisableSimulator(ulong handle, UUID avatarID);
43 void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY); 43 void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY);
44 void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, 44 void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint,
45 string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY); 45 string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY);
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 6b31555..5c33f12 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -618,13 +618,147 @@ namespace OpenSim.Region.Framework.Scenes.Animation
618 int rnditerations = 3; 618 int rnditerations = 3;
619 BinBVHAnimation anim = new BinBVHAnimation(); 619 BinBVHAnimation anim = new BinBVHAnimation();
620 List<string> parts = new List<string>(); 620 List<string> parts = new List<string>();
621 parts.Add("mPelvis"); parts.Add("mHead"); parts.Add("mTorso"); 621
622 parts.Add("mHipLeft"); parts.Add("mHipRight"); parts.Add("mHipLeft"); parts.Add("mKneeLeft"); 622 /// Torso and Head
623 parts.Add("mKneeRight"); parts.Add("mCollarLeft"); parts.Add("mCollarRight"); parts.Add("mNeck"); 623 parts.Add("mPelvis");
624 parts.Add("mElbowLeft"); parts.Add("mElbowRight"); parts.Add("mWristLeft"); parts.Add("mWristRight"); 624 parts.Add("mTorso");
625 parts.Add("mShoulderLeft"); parts.Add("mShoulderRight"); parts.Add("mAnkleLeft"); parts.Add("mAnkleRight"); 625 parts.Add("mChest");
626 parts.Add("mEyeRight"); parts.Add("mChest"); parts.Add("mToeLeft"); parts.Add("mToeRight"); 626 parts.Add("mNeck");
627 parts.Add("mFootLeft"); parts.Add("mFootRight"); parts.Add("mEyeLeft"); 627 parts.Add("mHead");
628 parts.Add("mSkull");
629 parts.Add("mEyeRight");
630 parts.Add("mEyeLeft");
631 /// Arms
632 parts.Add("mCollarLeft");
633 parts.Add("mShoulderLeft");
634 parts.Add("mElbowLeft");
635 parts.Add("mWristLeft");
636 parts.Add("mCollarRight");
637 parts.Add("mShoulderRight");
638 parts.Add("mElbowRight");
639 parts.Add("mWristRight");
640 /// Legs
641 parts.Add("mHipLeft");
642 parts.Add("mKneeLeft");
643 parts.Add("mAnkleLeft");
644 parts.Add("mFootLeft");
645 parts.Add("mToeLeft");
646 parts.Add("mHipRight");
647 parts.Add("mKneeRight");
648 parts.Add("mAnkleRight");
649 parts.Add("mFootRight");
650 parts.Add("mToeRight");
651 ///Hands
652 parts.Add("mHandThumb1Left");
653 parts.Add("mHandThumb1Right");
654 parts.Add("mHandThumb2Left");
655 parts.Add("mHandThumb2Right");
656 parts.Add("mHandThumb3Left");
657 parts.Add("mHandThumb3Right");
658 parts.Add("mHandIndex1Left");
659 parts.Add("mHandIndex1Right");
660 parts.Add("mHandIndex2Left");
661 parts.Add("mHandIndex2Right");
662 parts.Add("mHandIndex3Left");
663 parts.Add("mHandIndex3Right");
664 parts.Add("mHandMiddle1Left");
665 parts.Add("mHandMiddle1Right");
666 parts.Add("mHandMiddle2Left");
667 parts.Add("mHandMiddle2Right");
668 parts.Add("mHandMiddle3Left");
669 parts.Add("mHandMiddle3Right");
670 parts.Add("mHandRing1Left");
671 parts.Add("mHandRing1Right");
672 parts.Add("mHandRing2Left");
673 parts.Add("mHandRing2Right");
674 parts.Add("mHandRing3Left");
675 parts.Add("mHandRing3Right");
676 parts.Add("mHandPinky1Left");
677 parts.Add("mHandPinky1Right");
678 parts.Add("mHandPinky2Left");
679 parts.Add("mHandPinky2Right");
680 parts.Add("mHandPinky3Left");
681 parts.Add("mHandPinky3Right");
682 ///Face
683 parts.Add("mFaceForeheadLeft");
684 parts.Add("mFaceForeheadCenter");
685 parts.Add("mFaceForeheadRight");
686 parts.Add("mFaceEyebrowOuterLeft");
687 parts.Add("mFaceEyebrowCenterLeft");
688 parts.Add("mFaceEyebrowInnerLeft");
689 parts.Add("mFaceEyebrowOuterRight");
690 parts.Add("mFaceEyebrowCenterRight");
691 parts.Add("mFaceEyebrowInnerRight");
692 parts.Add("mFaceEyeLidUpperLeft");
693 parts.Add("mFaceEyeLidLowerLeft");
694 parts.Add("mFaceEyeLidUpperRight");
695 parts.Add("mFaceEyeLidLowerRight");
696 parts.Add("mFaceEyeAltLeft");
697 parts.Add("mFaceEyeAltRight");
698 parts.Add("mFaceEyecornerInnerLeft");
699 parts.Add("mFaceEyecornerInnerRight");
700 parts.Add("mFaceEar1Left");
701 parts.Add("mFaceEar2Left");
702 parts.Add("mFaceEar1Right");
703 parts.Add("mFaceEar2Right");
704 parts.Add("mFaceNoseLeft");
705 parts.Add("mFaceNoseCenter");
706 parts.Add("mFaceNoseRight");
707 parts.Add("mFaceNoseBase");
708 parts.Add("mFaceNoseBridge");
709 parts.Add("mFaceCheekUpperInnerLeft");
710 parts.Add("mFaceCheekUpperOuterLeft");
711 parts.Add("mFaceCheekUpperInnerRight");
712 parts.Add("mFaceCheekUpperOuterRight");
713 parts.Add("mFaceJaw");
714 parts.Add("mFaceLipUpperLeft");
715 parts.Add("mFaceLipUpperCenter");
716 parts.Add("mFaceLipUpperRight");
717 parts.Add("mFaceLipCornerLeft");
718 parts.Add("mFaceLipCornerRight");
719 parts.Add("mFaceTongueBase");
720 parts.Add("mFaceTongueTip");
721 parts.Add("mFaceLipLowerLeft");
722 parts.Add("mFaceLipLowerCenter");
723 parts.Add("mFaceLipLowerRight");
724 parts.Add("mFaceTeethLower");
725 parts.Add("mFaceTeethUpper");
726 parts.Add("mFaceChin");
727 ///Spine
728 parts.Add("mSpine1");
729 parts.Add("mSpine2");
730 parts.Add("mSpine3");
731 parts.Add("mSpine4");
732 ///Wings
733 parts.Add("mWingsRoot");
734 parts.Add("mWing1Left");
735 parts.Add("mWing2Left");
736 parts.Add("mWing3Left");
737 parts.Add("mWing4Left");
738 parts.Add("mWing1Right");
739 parts.Add("mWing2Right");
740 parts.Add("mWing3Right");
741 parts.Add("mWing4Right");
742 parts.Add("mWing4FanRight");
743 parts.Add("mWing4FanLeft");
744 ///Hind Limbs
745 parts.Add("mHindLimbsRoot");
746 parts.Add("mHindLimb1Left");
747 parts.Add("mHindLimb2Left");
748 parts.Add("mHindLimb3Left");
749 parts.Add("mHindLimb4Left");
750 parts.Add("mHindLimb1Right");
751 parts.Add("mHindLimb2Right");
752 parts.Add("mHindLimb3Right");
753 parts.Add("mHindLimb4Right");
754 ///Tail
755 parts.Add("mTail1");
756 parts.Add("mTail2");
757 parts.Add("mTail3");
758 parts.Add("mTail4");
759 parts.Add("mTail5");
760 parts.Add("mTail6");
761
628 anim.HandPose = 1; 762 anim.HandPose = 1;
629 anim.InPoint = 0; 763 anim.InPoint = 0;
630 anim.OutPoint = (rnditerations * .10f); 764 anim.OutPoint = (rnditerations * .10f);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 55ccb0a..f1e27a5 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1884,7 +1884,8 @@ namespace OpenSim.Region.Framework.Scenes
1884 { 1884 {
1885 get 1885 get
1886 { 1886 {
1887 return new List<ulong>(KnownRegions.Keys); 1887 lock (m_knownChildRegions)
1888 return new List<ulong>(m_knownChildRegions.Keys);
1888 } 1889 }
1889 } 1890 }
1890 1891
@@ -4407,26 +4408,15 @@ namespace OpenSim.Region.Framework.Scenes
4407 4408
4408 } 4409 }
4409 4410
4410 /* useless. Either use MakeChild or delete the presence
4411 public void Reset()
4412 {
4413 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);
4414
4415 // Put the child agent back at the center
4416 AbsolutePosition
4417 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70);
4418
4419 Animator.ResetAnimations();
4420 }
4421 */
4422 /// <summary> 4411 /// <summary>
4423 /// Computes which child agents to close when the scene presence moves to another region. 4412 /// Computes which child agents to close when the scene presence moves to another region.
4424 /// Removes those regions from m_knownRegions. 4413 /// Removes those regions from m_knownRegions.
4425 /// </summary> 4414 /// </summary>
4426 /// <param name="newRegionX">The new region's x on the map</param> 4415 /// <param name="newRegionHandle">The new region's handle</param>
4427 /// <param name="newRegionY">The new region's y on the map</param> 4416 /// <param name="newRegionSizeX">The new region's size x</param>
4417 /// <param name="newRegionSizeY">The new region's size y</param>
4428 /// <returns></returns> 4418 /// <returns></returns>
4429 public void CloseChildAgents(bool logout, ulong newRegionHandle, int newRegionSizeX, int newRegionSizeY) 4419 public List<ulong> GetChildAgentsToClose(ulong newRegionHandle, int newRegionSizeX, int newRegionSizeY)
4430 { 4420 {
4431 uint newRegionX, newRegionY; 4421 uint newRegionX, newRegionY;
4432 List<ulong> byebyeRegions = new List<ulong>(); 4422 List<ulong> byebyeRegions = new List<ulong>();
@@ -4442,37 +4432,37 @@ namespace OpenSim.Region.Framework.Scenes
4442 4432
4443 foreach (ulong handle in knownRegions) 4433 foreach (ulong handle in knownRegions)
4444 { 4434 {
4445 // Don't close the agent on this region yet 4435 if(newRegionY == 0) // HG
4446 if (handle != Scene.RegionInfo.RegionHandle) 4436 byebyeRegions.Add(handle);
4437 else
4447 { 4438 {
4448 if (logout) 4439 Util.RegionHandleToRegionLoc(handle, out x, out y);
4449 byebyeRegions.Add(handle); 4440 if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo))
4450 else
4451 { 4441 {
4452 Util.RegionHandleToRegionLoc(handle, out x, out y); 4442// if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY,
4453 if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo)) 4443 // for now need to close all but first order bc RegionViewDistance it the target value not ours
4444 if (Util.IsOutsideView(255, x, newRegionX, y, newRegionY,
4445 regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY))
4454 { 4446 {
4455 if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, 4447 byebyeRegions.Add(handle);
4456 regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY))
4457 {
4458 byebyeRegions.Add(handle);
4459 }
4460 } 4448 }
4461 else 4449 }
4450 else
4451 {
4452 if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY,
4453 (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY))
4462 { 4454 {
4463 if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, 4455 byebyeRegions.Add(handle);
4464 (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY))
4465 {
4466 byebyeRegions.Add(handle);
4467 // this should not be here
4468// if(eventQueue != null)
4469// eventQueue.DisableSimulator(handle,UUID);
4470 }
4471 } 4456 }
4472 } 4457 }
4473 } 4458 }
4474 } 4459 }
4460 return byebyeRegions;
4461 }
4475 4462
4463 public void CloseChildAgents(List<ulong> byebyeRegions)
4464 {
4465 byebyeRegions.Remove(Scene.RegionInfo.RegionHandle);
4476 if (byebyeRegions.Count > 0) 4466 if (byebyeRegions.Count > 0)
4477 { 4467 {
4478 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); 4468 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");