From 5c156508e23ba04632c2eb49070ff1bc6e8bf38d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 31 May 2017 12:33:35 +0100 Subject: mantis 8182: update/fix GenerateRandomAnimation(). not updating libomv avatar data bc have no idea why do do have it, so leave it to who does know --- .../Scenes/Animation/ScenePresenceAnimator.cs | 148 ++++++++++++++++++++- 1 file changed, 141 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework') 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 int rnditerations = 3; BinBVHAnimation anim = new BinBVHAnimation(); List parts = new List(); - parts.Add("mPelvis"); parts.Add("mHead"); parts.Add("mTorso"); - parts.Add("mHipLeft"); parts.Add("mHipRight"); parts.Add("mHipLeft"); parts.Add("mKneeLeft"); - parts.Add("mKneeRight"); parts.Add("mCollarLeft"); parts.Add("mCollarRight"); parts.Add("mNeck"); - parts.Add("mElbowLeft"); parts.Add("mElbowRight"); parts.Add("mWristLeft"); parts.Add("mWristRight"); - parts.Add("mShoulderLeft"); parts.Add("mShoulderRight"); parts.Add("mAnkleLeft"); parts.Add("mAnkleRight"); - parts.Add("mEyeRight"); parts.Add("mChest"); parts.Add("mToeLeft"); parts.Add("mToeRight"); - parts.Add("mFootLeft"); parts.Add("mFootRight"); parts.Add("mEyeLeft"); + + /// Torso and Head + parts.Add("mPelvis"); + parts.Add("mTorso"); + parts.Add("mChest"); + parts.Add("mNeck"); + parts.Add("mHead"); + parts.Add("mSkull"); + parts.Add("mEyeRight"); + parts.Add("mEyeLeft"); + /// Arms + parts.Add("mCollarLeft"); + parts.Add("mShoulderLeft"); + parts.Add("mElbowLeft"); + parts.Add("mWristLeft"); + parts.Add("mCollarRight"); + parts.Add("mShoulderRight"); + parts.Add("mElbowRight"); + parts.Add("mWristRight"); + /// Legs + parts.Add("mHipLeft"); + parts.Add("mKneeLeft"); + parts.Add("mAnkleLeft"); + parts.Add("mFootLeft"); + parts.Add("mToeLeft"); + parts.Add("mHipRight"); + parts.Add("mKneeRight"); + parts.Add("mAnkleRight"); + parts.Add("mFootRight"); + parts.Add("mToeRight"); + ///Hands + parts.Add("mHandThumb1Left"); + parts.Add("mHandThumb1Right"); + parts.Add("mHandThumb2Left"); + parts.Add("mHandThumb2Right"); + parts.Add("mHandThumb3Left"); + parts.Add("mHandThumb3Right"); + parts.Add("mHandIndex1Left"); + parts.Add("mHandIndex1Right"); + parts.Add("mHandIndex2Left"); + parts.Add("mHandIndex2Right"); + parts.Add("mHandIndex3Left"); + parts.Add("mHandIndex3Right"); + parts.Add("mHandMiddle1Left"); + parts.Add("mHandMiddle1Right"); + parts.Add("mHandMiddle2Left"); + parts.Add("mHandMiddle2Right"); + parts.Add("mHandMiddle3Left"); + parts.Add("mHandMiddle3Right"); + parts.Add("mHandRing1Left"); + parts.Add("mHandRing1Right"); + parts.Add("mHandRing2Left"); + parts.Add("mHandRing2Right"); + parts.Add("mHandRing3Left"); + parts.Add("mHandRing3Right"); + parts.Add("mHandPinky1Left"); + parts.Add("mHandPinky1Right"); + parts.Add("mHandPinky2Left"); + parts.Add("mHandPinky2Right"); + parts.Add("mHandPinky3Left"); + parts.Add("mHandPinky3Right"); + ///Face + parts.Add("mFaceForeheadLeft"); + parts.Add("mFaceForeheadCenter"); + parts.Add("mFaceForeheadRight"); + parts.Add("mFaceEyebrowOuterLeft"); + parts.Add("mFaceEyebrowCenterLeft"); + parts.Add("mFaceEyebrowInnerLeft"); + parts.Add("mFaceEyebrowOuterRight"); + parts.Add("mFaceEyebrowCenterRight"); + parts.Add("mFaceEyebrowInnerRight"); + parts.Add("mFaceEyeLidUpperLeft"); + parts.Add("mFaceEyeLidLowerLeft"); + parts.Add("mFaceEyeLidUpperRight"); + parts.Add("mFaceEyeLidLowerRight"); + parts.Add("mFaceEyeAltLeft"); + parts.Add("mFaceEyeAltRight"); + parts.Add("mFaceEyecornerInnerLeft"); + parts.Add("mFaceEyecornerInnerRight"); + parts.Add("mFaceEar1Left"); + parts.Add("mFaceEar2Left"); + parts.Add("mFaceEar1Right"); + parts.Add("mFaceEar2Right"); + parts.Add("mFaceNoseLeft"); + parts.Add("mFaceNoseCenter"); + parts.Add("mFaceNoseRight"); + parts.Add("mFaceNoseBase"); + parts.Add("mFaceNoseBridge"); + parts.Add("mFaceCheekUpperInnerLeft"); + parts.Add("mFaceCheekUpperOuterLeft"); + parts.Add("mFaceCheekUpperInnerRight"); + parts.Add("mFaceCheekUpperOuterRight"); + parts.Add("mFaceJaw"); + parts.Add("mFaceLipUpperLeft"); + parts.Add("mFaceLipUpperCenter"); + parts.Add("mFaceLipUpperRight"); + parts.Add("mFaceLipCornerLeft"); + parts.Add("mFaceLipCornerRight"); + parts.Add("mFaceTongueBase"); + parts.Add("mFaceTongueTip"); + parts.Add("mFaceLipLowerLeft"); + parts.Add("mFaceLipLowerCenter"); + parts.Add("mFaceLipLowerRight"); + parts.Add("mFaceTeethLower"); + parts.Add("mFaceTeethUpper"); + parts.Add("mFaceChin"); + ///Spine + parts.Add("mSpine1"); + parts.Add("mSpine2"); + parts.Add("mSpine3"); + parts.Add("mSpine4"); + ///Wings + parts.Add("mWingsRoot"); + parts.Add("mWing1Left"); + parts.Add("mWing2Left"); + parts.Add("mWing3Left"); + parts.Add("mWing4Left"); + parts.Add("mWing1Right"); + parts.Add("mWing2Right"); + parts.Add("mWing3Right"); + parts.Add("mWing4Right"); + parts.Add("mWing4FanRight"); + parts.Add("mWing4FanLeft"); + ///Hind Limbs + parts.Add("mHindLimbsRoot"); + parts.Add("mHindLimb1Left"); + parts.Add("mHindLimb2Left"); + parts.Add("mHindLimb3Left"); + parts.Add("mHindLimb4Left"); + parts.Add("mHindLimb1Right"); + parts.Add("mHindLimb2Right"); + parts.Add("mHindLimb3Right"); + parts.Add("mHindLimb4Right"); + ///Tail + parts.Add("mTail1"); + parts.Add("mTail2"); + parts.Add("mTail3"); + parts.Add("mTail4"); + parts.Add("mTail5"); + parts.Add("mTail6"); + anim.HandPose = 1; anim.InPoint = 0; anim.OutPoint = (rnditerations * .10f); -- cgit v1.1 From c68e7b66218a6f85fdca71be2740bf9a15e92f37 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 31 May 2017 23:31:02 +0100 Subject: change child agents close control; disablesimulator is not a caps event message --- OpenSim/Region/Framework/Interfaces/IEventQueue.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 64 +++++++++------------- 2 files changed, 28 insertions(+), 38 deletions(-) (limited to 'OpenSim/Region/Framework') 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 bool Enqueue(OSD o, UUID avatarID); // These are required to decouple Scenes from EventQueueHelper - void DisableSimulator(ulong handle, UUID avatarID); +// void DisableSimulator(ulong handle, UUID avatarID); void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY); void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY); 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 { get { - return new List(KnownRegions.Keys); + lock (m_knownChildRegions) + return new List(m_knownChildRegions.Keys); } } @@ -4407,26 +4408,15 @@ namespace OpenSim.Region.Framework.Scenes } - /* useless. Either use MakeChild or delete the presence - public void Reset() - { - // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); - - // Put the child agent back at the center - AbsolutePosition - = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70); - - Animator.ResetAnimations(); - } - */ /// /// Computes which child agents to close when the scene presence moves to another region. /// Removes those regions from m_knownRegions. /// - /// The new region's x on the map - /// The new region's y on the map + /// The new region's handle + /// The new region's size x + /// The new region's size y /// - public void CloseChildAgents(bool logout, ulong newRegionHandle, int newRegionSizeX, int newRegionSizeY) + public List GetChildAgentsToClose(ulong newRegionHandle, int newRegionSizeX, int newRegionSizeY) { uint newRegionX, newRegionY; List byebyeRegions = new List(); @@ -4442,37 +4432,37 @@ namespace OpenSim.Region.Framework.Scenes foreach (ulong handle in knownRegions) { - // Don't close the agent on this region yet - if (handle != Scene.RegionInfo.RegionHandle) + if(newRegionY == 0) // HG + byebyeRegions.Add(handle); + else { - if (logout) - byebyeRegions.Add(handle); - else + Util.RegionHandleToRegionLoc(handle, out x, out y); + if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo)) { - Util.RegionHandleToRegionLoc(handle, out x, out y); - if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo)) +// if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, + // for now need to close all but first order bc RegionViewDistance it the target value not ours + if (Util.IsOutsideView(255, x, newRegionX, y, newRegionY, + regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY)) { - if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, - regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY)) - { - byebyeRegions.Add(handle); - } + byebyeRegions.Add(handle); } - else + } + else + { + if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, + (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY)) { - if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, - (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY)) - { - byebyeRegions.Add(handle); - // this should not be here -// if(eventQueue != null) -// eventQueue.DisableSimulator(handle,UUID); - } + byebyeRegions.Add(handle); } } } } + return byebyeRegions; + } + public void CloseChildAgents(List byebyeRegions) + { + byebyeRegions.Remove(Scene.RegionInfo.RegionHandle); if (byebyeRegions.Count > 0) { m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); -- cgit v1.1