diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d0c20ff..c67463a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -670,8 +670,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
670 | 670 | ||
671 | 671 | ||
672 | AdjustKnownSeeds(); | 672 | AdjustKnownSeeds(); |
673 | 673 | Animator.TrySetMovementAnimation("STAND"); | |
674 | Animator.TrySetMovementAnimation("STAND"); | ||
675 | // we created a new ScenePresence (a new child agent) in a fresh region. | 674 | // we created a new ScenePresence (a new child agent) in a fresh region. |
676 | // Request info about all the (root) agents in this region | 675 | // Request info about all the (root) agents in this region |
677 | // Note: This won't send data *to* other clients in that region (children don't send) | 676 | // Note: This won't send data *to* other clients in that region (children don't send) |
@@ -1691,7 +1690,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1691 | SetHeight(m_avHeight); | 1690 | SetHeight(m_avHeight); |
1692 | } | 1691 | } |
1693 | } | 1692 | } |
1694 | |||
1695 | Animator.TrySetMovementAnimation("STAND"); | 1693 | Animator.TrySetMovementAnimation("STAND"); |
1696 | } | 1694 | } |
1697 | 1695 | ||
@@ -1858,15 +1856,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1858 | (offset * partRot); | 1856 | (offset * partRot); |
1859 | } | 1857 | } |
1860 | 1858 | ||
1861 | Console.WriteLine(" "); | 1859 | //Console.WriteLine(" "); |
1862 | Console.WriteLine("link number ={0}", part.LinkNum); | 1860 | //Console.WriteLine("link number ={0}", part.LinkNum); |
1863 | Console.WriteLine("Prim offset ={0}", part.OffsetPosition ); | 1861 | //Console.WriteLine("Prim offset ={0}", part.OffsetPosition ); |
1864 | Console.WriteLine("Root Rotate ={0}", part.ParentGroup.RootPart.RotationOffset); | 1862 | //Console.WriteLine("Root Rotate ={0}", part.ParentGroup.RootPart.RotationOffset); |
1865 | Console.WriteLine("Click offst ={0}", offset); | 1863 | //Console.WriteLine("Click offst ={0}", offset); |
1866 | Console.WriteLine("Prim Rotate ={0}", part.GetWorldRotation()); | 1864 | //Console.WriteLine("Prim Rotate ={0}", part.GetWorldRotation()); |
1867 | Console.WriteLine("offsetr ={0}", offsetr); | 1865 | //Console.WriteLine("offsetr ={0}", offsetr); |
1868 | Console.WriteLine("Camera At ={0}", cameraAtOffset); | 1866 | //Console.WriteLine("Camera At ={0}", cameraAtOffset); |
1869 | Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | 1867 | //Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); |
1870 | 1868 | ||
1871 | ControllingClient.SendSitResponse(part.UUID, offsetr, sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); | 1869 | ControllingClient.SendSitResponse(part.UUID, offsetr, sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); |
1872 | m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target | 1870 | m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target |
@@ -2218,7 +2216,7 @@ Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | |||
2218 | m_avUnscriptedSitPos; // adds click offset, if any | 2216 | m_avUnscriptedSitPos; // adds click offset, if any |
2219 | //Set up raytrace to find top surface of prim | 2217 | //Set up raytrace to find top surface of prim |
2220 | Vector3 size = part.Scale; | 2218 | Vector3 size = part.Scale; |
2221 | float mag = 0.1f + (float)Math.Sqrt((size.X * size.X) + (size.Y * size.Y) + (size.Z * size.Z)); | 2219 | float mag = 2.0f; // 0.1f + (float)Math.Sqrt((size.X * size.X) + (size.Y * size.Y) + (size.Z * size.Z)); |
2222 | Vector3 start = part.AbsolutePosition + new Vector3(0f, 0f, mag); | 2220 | Vector3 start = part.AbsolutePosition + new Vector3(0f, 0f, mag); |
2223 | Vector3 down = new Vector3(0f, 0f, -1f); | 2221 | Vector3 down = new Vector3(0f, 0f, -1f); |
2224 | //Console.WriteLine("st={0} do={1} ma={2}", start, down, mag); | 2222 | //Console.WriteLine("st={0} do={1} ma={2}", start, down, mag); |
@@ -2267,7 +2265,7 @@ Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | |||
2267 | Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction | 2265 | Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction |
2268 | //Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset); | 2266 | //Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset); |
2269 | m_pos += offset; | 2267 | m_pos += offset; |
2270 | ControllingClient.SendClearFollowCamProperties(part.UUID); | 2268 | // ControllingClient.SendClearFollowCamProperties(part.UUID); |
2271 | 2269 | ||
2272 | } | 2270 | } |
2273 | } // End SitAltitudeCallback KF. | 2271 | } // End SitAltitudeCallback KF. |
@@ -3297,7 +3295,7 @@ Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | |||
3297 | m_updateflag = true; | 3295 | m_updateflag = true; |
3298 | Velocity = force; | 3296 | Velocity = force; |
3299 | m_isNudging = false; | 3297 | m_isNudging = false; |
3300 | m_updateCount = UPDATE_COUNT; //KF: Update anims to pickup "STAND" | 3298 | m_updateCount = UPDATE_COUNT; //KF: Update anims to pickup "STAND" |
3301 | } | 3299 | } |
3302 | } | 3300 | } |
3303 | } | 3301 | } |
@@ -3349,19 +3347,19 @@ Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | |||
3349 | // Event called by the physics plugin to tell the avatar about a collision. | 3347 | // Event called by the physics plugin to tell the avatar about a collision. |
3350 | private void PhysicsCollisionUpdate(EventArgs e) | 3348 | private void PhysicsCollisionUpdate(EventArgs e) |
3351 | { | 3349 | { |
3352 | if (m_updateCount > 0) //KF: Update Anims for a short period. Many Anim | ||
3353 | { // changes are very asynchronous. | ||
3354 | Animator.UpdateMovementAnimations(); | ||
3355 | m_updateCount--; | ||
3356 | } | ||
3357 | |||
3358 | if (e == null) | 3350 | if (e == null) |
3359 | return; | 3351 | return; |
3360 | 3352 | ||
3361 | // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents( | 3353 | // The Physics Scene will send (spam!) updates every 500 ms grep: m_physicsActor.SubscribeEvents( |
3362 | // as of this comment the interval is set in AddToPhysicalScene | 3354 | // as of this comment the interval is set in AddToPhysicalScene |
3363 | if (Animator!=null) | 3355 | if (Animator!=null) |
3364 | Animator.UpdateMovementAnimations(); | 3356 | { |
3357 | if (m_updateCount > 0) //KF: DO NOT call UpdateMovementAnimations outside of the m_updateCount wrapper, | ||
3358 | { // else its will lock out other animation changes, like ground sit. | ||
3359 | Animator.UpdateMovementAnimations(); | ||
3360 | m_updateCount--; | ||
3361 | } | ||
3362 | } | ||
3365 | 3363 | ||
3366 | CollisionEventUpdate collisionData = (CollisionEventUpdate)e; | 3364 | CollisionEventUpdate collisionData = (CollisionEventUpdate)e; |
3367 | Dictionary<uint, ContactPoint> coldata = collisionData.m_objCollisionList; | 3365 | Dictionary<uint, ContactPoint> coldata = collisionData.m_objCollisionList; |
@@ -3370,7 +3368,7 @@ Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | |||
3370 | 3368 | ||
3371 | if (m_lastColCount != coldata.Count) | 3369 | if (m_lastColCount != coldata.Count) |
3372 | { | 3370 | { |
3373 | m_updateCount = 10; | 3371 | m_updateCount = UPDATE_COUNT; |
3374 | m_lastColCount = coldata.Count; | 3372 | m_lastColCount = coldata.Count; |
3375 | } | 3373 | } |
3376 | 3374 | ||