Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2012-12-13 08:36:18 +01:00
commit 3cf0d8b165
2 changed files with 39 additions and 5 deletions

View File

@ -5122,7 +5122,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
update.PCode = (byte)PCode.Avatar;
update.ProfileCurve = 1;
update.PSBlock = Utils.EmptyBytes;
update.Scale = new Vector3(0.45f, 0.6f, 1.9f);
update.Scale = data.Appearance.AvatarSize;
// update.Scale.Z -= 0.2f;
update.Text = Utils.EmptyBytes;
update.TextColor = new byte[4];

View File

@ -140,6 +140,8 @@ namespace OpenSim.Region.Framework.Scenes
private Vector3 m_lastPosition;
private Quaternion m_lastRotation;
private Vector3 m_lastVelocity;
private Vector3 m_lastSize = new Vector3(0.45f,0.6f,1.9f);
private Vector3? m_forceToApply;
private int m_userFlags;
@ -563,6 +565,23 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public override Vector3 AngularVelocity
{
get
{
if (PhysicsActor != null)
{
m_rotationalvelocity = PhysicsActor.RotationalVelocity;
// m_log.DebugFormat(
// "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!",
// m_velocity, Name, Scene.RegionInfo.RegionName);
}
return m_rotationalvelocity;
}
}
private Quaternion m_bodyRot = Quaternion.Identity;
public Quaternion Rotation
@ -1264,6 +1283,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (PhysicsActor != null && !IsChildAgent)
PhysicsActor.setAvatarSize(size, feetoffset);
}
/// <summary>
@ -2572,9 +2592,13 @@ namespace OpenSim.Region.Framework.Scenes
// NOTE: Velocity is not the same as m_velocity. Velocity will attempt to
// grab the latest PhysicsActor velocity, whereas m_velocity is often
// storing a requested force instead of an actual traveling velocity
if (Appearance.AvatarSize != m_lastSize)
{
m_lastSize = Appearance.AvatarSize;
SendAvatarDataToAllAgents();
}
// Throw away duplicate or insignificant updates
if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
else if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
{
@ -2872,6 +2896,8 @@ namespace OpenSim.Region.Framework.Scenes
avatar.ControllingClient.SendAppearance(
UUID, Appearance.VisualParams, Appearance.Texture.GetBytes());
}
#endregion
@ -3517,10 +3543,9 @@ namespace OpenSim.Region.Framework.Scenes
// m_lastColCount = coldata.Count;
// }
CollisionPlane = Vector4.UnitW;
if (coldata.Count != 0)
{
/*
switch (Animator.CurrentMovementAnimation)
{
case "STAND":
@ -3529,6 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes
case "CROUCH":
case "CROUCHWALK":
{
*/
ContactPoint lowest;
lowest.SurfaceNormal = Vector3.Zero;
lowest.Position = Vector3.Zero;
@ -3548,10 +3574,16 @@ namespace OpenSim.Region.Framework.Scenes
lowest.SurfaceNormal = -lowest.SurfaceNormal;
CollisionPlane = new Vector4(lowest.SurfaceNormal, Vector3.Dot(lowest.Position, lowest.SurfaceNormal));
}
else
CollisionPlane = Vector4.UnitW;
/*
}
break;
}
*/
}
else
CollisionPlane = Vector4.UnitW;
RaiseCollisionScriptEvents(coldata);