From 6e01769bcff35be9cace62a0342cf2d275608891 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 12 Feb 2008 04:27:20 +0000 Subject: * A bunch of updates to make things more smooth. ** Sending the actual TimeDilation to the client now instead of the 62455 constant. The client is *supposed* to use that value to sync with the simulator. (actually sending ushort.maxvalue * TimeDilation) ** Disabling prim that inter-penetrate instead of just not attaching a joint ** Reduced prim spin a 'little' bit, but not *enough* ** Tweaked the TimeDilation algorithm to be closer to 1.0 by default and various changes to the sim stats reporter ** Created a .SetValues method to PhysicsVector so we can simply call the setvalues function instead of .x, .y, .z sets. ** Experimented with a .GetBytes Method on PhysicsActor to be able to use the LLVector3.FromBytes() method. ** Upped the Inter-penetration depth to 0.25 instead of .08. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 180ed51..7900900 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -94,10 +94,12 @@ namespace OpenSim.Region.Environment.Scenes public byte ObjectSaleType; public int SalePrice; public uint Category; + public Int32 CreationDate; public uint ParentID = 0; + private PhysicsVector m_lastRotationalVelocity = PhysicsVector.Zero; private Vector3 m_sitTargetPosition = new Vector3(0, 0, 0); private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1); private LLUUID m_sitTargetAvatar = LLUUID.Zero; @@ -417,9 +419,7 @@ namespace OpenSim.Region.Environment.Scenes { if (PhysActor.IsPhysical) { - m_rotationalvelocity.X = PhysActor.RotationalVelocity.X; - m_rotationalvelocity.Y = PhysActor.RotationalVelocity.Y; - m_rotationalvelocity.Z = PhysActor.RotationalVelocity.Z; + m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(),0); } } @@ -1693,7 +1693,7 @@ namespace OpenSim.Region.Environment.Scenes byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; - remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid, + remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, m_shape, lPos, clientFlags, m_uuid, OwnerID, m_text, color, ParentID, m_particleSystem, lRot, m_clickAction, m_TextureAnimation); } @@ -1741,12 +1741,13 @@ namespace OpenSim.Region.Environment.Scenes LLQuaternion mRot = RotationOffset; if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) { - remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot); } else { - remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity, + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot, Velocity, RotationalVelocity); + //System.Console.WriteLine("LID: " + LocalID + " RVel:" + RotationalVelocity.ToString() + " TD: " + ((ushort)(m_parentGroup.Scene.TimeDilation * 500000f)).ToString() + ":" + m_parentGroup.Scene.TimeDilation.ToString()); } } @@ -1755,13 +1756,13 @@ namespace OpenSim.Region.Environment.Scenes LLQuaternion mRot = RotationOffset; if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) { - remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot); } else { - remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity, + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot, Velocity, RotationalVelocity); - //System.Console.WriteLine("RVel:" + RotationalVelocity); + //System.Console.WriteLine("LID: " + LocalID + "RVel:" + RotationalVelocity.ToString() + " TD: " + ((ushort)(m_parentGroup.Scene.TimeDilation * 500000f)).ToString() + ":" + m_parentGroup.Scene.TimeDilation.ToString()); } } -- cgit v1.1