diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 41ba73a3ed..a64ce2ce21 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4438,8 +4438,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP data[pos++] = 0; // AppearanceHover vector 3 data[pos++] = 1; - Utils.FloatToBytesSafepos(0, data, pos); pos += 4; - Utils.FloatToBytesSafepos(0, data, pos); pos += 4; + //Utils.FloatToBytesSafepos(0, data, pos); pos += 4; + //Utils.FloatToBytesSafepos(0, data, pos); pos += 4; + Utils.Int64ZeroToBytes(data, pos); pos += 8; Utils.FloatToBytesSafepos(hover, data, pos); pos += 4; buf.DataLength = pos; @@ -6738,26 +6739,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion #region Helper Methods - private static void ClampVectorForUint(ref Vector3 v, float max) - { - float a, b; - - a = MathF.Abs(v.X); - b = MathF.Abs(v.Y); - if (b > a) - a = b; - b = MathF.Abs(v.Z); - if (b > a) - a = b; - - if (a > max) - { - a = max / a; - v.X *= a; - v.Y *= a; - v.Z *= a; - } - } protected static void CreateImprovedTerseBlock(ISceneEntity entity, byte[] data, ref int pos, bool includeTexture) { @@ -6834,7 +6815,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP data[pos++] = 1; //m_log.DebugFormat("CollisionPlane: {0}",collisionPlane); - if (collisionPlane == Vector4.Zero) + if (collisionPlane.IsZero()) Vector4.UnitW.ToBytes(data, pos); else collisionPlane.ToBytes(data, pos); @@ -6846,33 +6827,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP } // Position - position.ToBytes(data, pos); - pos += 12; + position.ToBytes(data, pos); pos += 12; // Velocity - ClampVectorForUint(ref velocity, 128f); - Utils.FloatToUInt16Bytes(velocity.X, 128.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(velocity.Y, 128.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(velocity.Z, 128.0f, data, pos); pos += 2; + velocity.ClampedToShortsBytes(128f,data,pos); pos += 6; // Acceleration - ClampVectorForUint(ref acceleration, 64f); - Utils.FloatToUInt16Bytes(acceleration.X, 64.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(acceleration.Y, 64.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(acceleration.Z, 64.0f, data, pos); pos += 2; + acceleration.ClampedToShortsBytes(64f, data, pos); pos += 6; // Rotation - - Utils.FloatToUInt16Bytes(rotation.X, 1.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(rotation.Y, 1.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(rotation.Z, 1.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(rotation.W, 1.0f, data, pos); pos += 2; + rotation.ToShortsBytes(data, pos); pos += 8; // Angular Velocity - ClampVectorForUint(ref angularVelocity, 64f); - Utils.FloatToUInt16Bytes(angularVelocity.X, 64.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(angularVelocity.Y, 64.0f, data, pos); pos += 2; - Utils.FloatToUInt16Bytes(angularVelocity.Z, 64.0f, data, pos); pos += 2; + angularVelocity.ClampedToShortsBytes(64f, data, pos); pos += 6; // texture entry block size if (te is null) diff --git a/bin/CSJ2K.dll b/bin/CSJ2K.dll index 06adf87735..2db6da94ed 100755 Binary files a/bin/CSJ2K.dll and b/bin/CSJ2K.dll differ diff --git a/bin/OpenMetaverse.Rendering.Meshmerizer.dll b/bin/OpenMetaverse.Rendering.Meshmerizer.dll index fdb5214757..1f9792370e 100755 Binary files a/bin/OpenMetaverse.Rendering.Meshmerizer.dll and b/bin/OpenMetaverse.Rendering.Meshmerizer.dll differ diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll index 7347038cb9..5f679bc23a 100755 Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index 864c781a58..e4defe100a 100755 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index fe7f19a2e6..db98493a3c 100755 Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ diff --git a/bin/PrimMesher.dll b/bin/PrimMesher.dll index 159ce04a19..ab8a35dfc4 100755 Binary files a/bin/PrimMesher.dll and b/bin/PrimMesher.dll differ