aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2012-12-13 07:34:27 +0000
committerUbitUmarov2012-12-13 07:34:27 +0000
commitb3a77c16bd2ad83076ddf19275b2f104210bba07 (patch)
treed8c6dd32a45ce57b3350d53f6f8601321ee70408 /OpenSim/Region
parentadd a Check method to flotsamAssetCache, so to check if a asset is in (diff)
downloadopensim-SC-b3a77c16bd2ad83076ddf19275b2f104210bba07.zip
opensim-SC-b3a77c16bd2ad83076ddf19275b2f104210bba07.tar.gz
opensim-SC-b3a77c16bd2ad83076ddf19275b2f104210bba07.tar.bz2
opensim-SC-b3a77c16bd2ad83076ddf19275b2f104210bba07.tar.xz
FIX small avatars movement on terrain. (avatar appearance getting even
more messy)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs40
2 files changed, 39 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index edb1a9d..4860da0 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5122,7 +5122,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5122 update.PCode = (byte)PCode.Avatar; 5122 update.PCode = (byte)PCode.Avatar;
5123 update.ProfileCurve = 1; 5123 update.ProfileCurve = 1;
5124 update.PSBlock = Utils.EmptyBytes; 5124 update.PSBlock = Utils.EmptyBytes;
5125 update.Scale = new Vector3(0.45f, 0.6f, 1.9f); 5125 update.Scale = data.Appearance.AvatarSize;
5126// update.Scale.Z -= 0.2f;
5127
5126 update.Text = Utils.EmptyBytes; 5128 update.Text = Utils.EmptyBytes;
5127 update.TextColor = new byte[4]; 5129 update.TextColor = new byte[4];
5128 5130
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9ada5bb..6299a8e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -140,6 +140,8 @@ namespace OpenSim.Region.Framework.Scenes
140 private Vector3 m_lastPosition; 140 private Vector3 m_lastPosition;
141 private Quaternion m_lastRotation; 141 private Quaternion m_lastRotation;
142 private Vector3 m_lastVelocity; 142 private Vector3 m_lastVelocity;
143 private Vector3 m_lastSize = new Vector3(0.45f,0.6f,1.9f);
144
143 145
144 private Vector3? m_forceToApply; 146 private Vector3? m_forceToApply;
145 private int m_userFlags; 147 private int m_userFlags;
@@ -563,6 +565,23 @@ namespace OpenSim.Region.Framework.Scenes
563 } 565 }
564 } 566 }
565 567
568 public override Vector3 AngularVelocity
569 {
570 get
571 {
572 if (PhysicsActor != null)
573 {
574 m_rotationalvelocity = PhysicsActor.RotationalVelocity;
575
576 // m_log.DebugFormat(
577 // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!",
578 // m_velocity, Name, Scene.RegionInfo.RegionName);
579 }
580
581 return m_rotationalvelocity;
582 }
583 }
584
566 private Quaternion m_bodyRot = Quaternion.Identity; 585 private Quaternion m_bodyRot = Quaternion.Identity;
567 586
568 public Quaternion Rotation 587 public Quaternion Rotation
@@ -1264,6 +1283,7 @@ namespace OpenSim.Region.Framework.Scenes
1264 { 1283 {
1265 if (PhysicsActor != null && !IsChildAgent) 1284 if (PhysicsActor != null && !IsChildAgent)
1266 PhysicsActor.setAvatarSize(size, feetoffset); 1285 PhysicsActor.setAvatarSize(size, feetoffset);
1286
1267 } 1287 }
1268 1288
1269 /// <summary> 1289 /// <summary>
@@ -2572,9 +2592,13 @@ namespace OpenSim.Region.Framework.Scenes
2572 // NOTE: Velocity is not the same as m_velocity. Velocity will attempt to 2592 // NOTE: Velocity is not the same as m_velocity. Velocity will attempt to
2573 // grab the latest PhysicsActor velocity, whereas m_velocity is often 2593 // grab the latest PhysicsActor velocity, whereas m_velocity is often
2574 // storing a requested force instead of an actual traveling velocity 2594 // storing a requested force instead of an actual traveling velocity
2595 if (Appearance.AvatarSize != m_lastSize)
2596 {
2597 m_lastSize = Appearance.AvatarSize;
2598 SendAvatarDataToAllAgents();
2599 }
2575 2600
2576 // Throw away duplicate or insignificant updates 2601 else if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
2577 if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
2578 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || 2602 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
2579 !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) 2603 !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
2580 { 2604 {
@@ -2872,6 +2896,8 @@ namespace OpenSim.Region.Framework.Scenes
2872 2896
2873 avatar.ControllingClient.SendAppearance( 2897 avatar.ControllingClient.SendAppearance(
2874 UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); 2898 UUID, Appearance.VisualParams, Appearance.Texture.GetBytes());
2899
2900
2875 } 2901 }
2876 2902
2877 #endregion 2903 #endregion
@@ -3517,10 +3543,9 @@ namespace OpenSim.Region.Framework.Scenes
3517// m_lastColCount = coldata.Count; 3543// m_lastColCount = coldata.Count;
3518// } 3544// }
3519 3545
3520 CollisionPlane = Vector4.UnitW;
3521
3522 if (coldata.Count != 0) 3546 if (coldata.Count != 0)
3523 { 3547 {
3548/*
3524 switch (Animator.CurrentMovementAnimation) 3549 switch (Animator.CurrentMovementAnimation)
3525 { 3550 {
3526 case "STAND": 3551 case "STAND":
@@ -3529,6 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes
3529 case "CROUCH": 3554 case "CROUCH":
3530 case "CROUCHWALK": 3555 case "CROUCHWALK":
3531 { 3556 {
3557 */
3532 ContactPoint lowest; 3558 ContactPoint lowest;
3533 lowest.SurfaceNormal = Vector3.Zero; 3559 lowest.SurfaceNormal = Vector3.Zero;
3534 lowest.Position = Vector3.Zero; 3560 lowest.Position = Vector3.Zero;
@@ -3548,10 +3574,16 @@ namespace OpenSim.Region.Framework.Scenes
3548 lowest.SurfaceNormal = -lowest.SurfaceNormal; 3574 lowest.SurfaceNormal = -lowest.SurfaceNormal;
3549 CollisionPlane = new Vector4(lowest.SurfaceNormal, Vector3.Dot(lowest.Position, lowest.SurfaceNormal)); 3575 CollisionPlane = new Vector4(lowest.SurfaceNormal, Vector3.Dot(lowest.Position, lowest.SurfaceNormal));
3550 } 3576 }
3577 else
3578 CollisionPlane = Vector4.UnitW;
3579/*
3551 } 3580 }
3552 break; 3581 break;
3553 } 3582 }
3583*/
3554 } 3584 }
3585 else
3586 CollisionPlane = Vector4.UnitW;
3555 3587
3556 RaiseCollisionScriptEvents(coldata); 3588 RaiseCollisionScriptEvents(coldata);
3557 3589