aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-12 04:27:20 +0000
committerTeravus Ovares2008-02-12 04:27:20 +0000
commit6e01769bcff35be9cace62a0342cf2d275608891 (patch)
tree124df7910fc0f1d31a13e297ced2dd73ce91a292 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentdefault to appending for log files per Mantis 530, and per (diff)
downloadopensim-SC-6e01769bcff35be9cace62a0342cf2d275608891.zip
opensim-SC-6e01769bcff35be9cace62a0342cf2d275608891.tar.gz
opensim-SC-6e01769bcff35be9cace62a0342cf2d275608891.tar.bz2
opensim-SC-6e01769bcff35be9cace62a0342cf2d275608891.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs19
1 files changed, 10 insertions, 9 deletions
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
94 public byte ObjectSaleType; 94 public byte ObjectSaleType;
95 public int SalePrice; 95 public int SalePrice;
96 public uint Category; 96 public uint Category;
97
97 98
98 public Int32 CreationDate; 99 public Int32 CreationDate;
99 public uint ParentID = 0; 100 public uint ParentID = 0;
100 101
102 private PhysicsVector m_lastRotationalVelocity = PhysicsVector.Zero;
101 private Vector3 m_sitTargetPosition = new Vector3(0, 0, 0); 103 private Vector3 m_sitTargetPosition = new Vector3(0, 0, 0);
102 private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1); 104 private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1);
103 private LLUUID m_sitTargetAvatar = LLUUID.Zero; 105 private LLUUID m_sitTargetAvatar = LLUUID.Zero;
@@ -417,9 +419,7 @@ namespace OpenSim.Region.Environment.Scenes
417 { 419 {
418 if (PhysActor.IsPhysical) 420 if (PhysActor.IsPhysical)
419 { 421 {
420 m_rotationalvelocity.X = PhysActor.RotationalVelocity.X; 422 m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(),0);
421 m_rotationalvelocity.Y = PhysActor.RotationalVelocity.Y;
422 m_rotationalvelocity.Z = PhysActor.RotationalVelocity.Z;
423 } 423 }
424 } 424 }
425 425
@@ -1693,7 +1693,7 @@ namespace OpenSim.Region.Environment.Scenes
1693 1693
1694 1694
1695 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; 1695 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
1696 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid, 1696 remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, m_shape, lPos, clientFlags, m_uuid,
1697 OwnerID, 1697 OwnerID,
1698 m_text, color, ParentID, m_particleSystem, lRot, m_clickAction, m_TextureAnimation); 1698 m_text, color, ParentID, m_particleSystem, lRot, m_clickAction, m_TextureAnimation);
1699 } 1699 }
@@ -1741,12 +1741,13 @@ namespace OpenSim.Region.Environment.Scenes
1741 LLQuaternion mRot = RotationOffset; 1741 LLQuaternion mRot = RotationOffset;
1742 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) 1742 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
1743 { 1743 {
1744 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); 1744 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot);
1745 } 1745 }
1746 else 1746 else
1747 { 1747 {
1748 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity, 1748 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot, Velocity,
1749 RotationalVelocity); 1749 RotationalVelocity);
1750 //System.Console.WriteLine("LID: " + LocalID + " RVel:" + RotationalVelocity.ToString() + " TD: " + ((ushort)(m_parentGroup.Scene.TimeDilation * 500000f)).ToString() + ":" + m_parentGroup.Scene.TimeDilation.ToString());
1750 } 1751 }
1751 } 1752 }
1752 1753
@@ -1755,13 +1756,13 @@ namespace OpenSim.Region.Environment.Scenes
1755 LLQuaternion mRot = RotationOffset; 1756 LLQuaternion mRot = RotationOffset;
1756 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) 1757 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
1757 { 1758 {
1758 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); 1759 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot);
1759 } 1760 }
1760 else 1761 else
1761 { 1762 {
1762 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot, Velocity, 1763 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalID, lPos, mRot, Velocity,
1763 RotationalVelocity); 1764 RotationalVelocity);
1764 //System.Console.WriteLine("RVel:" + RotationalVelocity); 1765 //System.Console.WriteLine("LID: " + LocalID + "RVel:" + RotationalVelocity.ToString() + " TD: " + ((ushort)(m_parentGroup.Scene.TimeDilation * 500000f)).ToString() + ":" + m_parentGroup.Scene.TimeDilation.ToString());
1765 } 1766 }
1766 } 1767 }
1767 1768