aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.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/Scene.cs
parentdefault to appending for log files per Mantis 530, and per (diff)
downloadopensim-SC_OLD-6e01769bcff35be9cace62a0342cf2d275608891.zip
opensim-SC_OLD-6e01769bcff35be9cace62a0342cf2d275608891.tar.gz
opensim-SC_OLD-6e01769bcff35be9cace62a0342cf2d275608891.tar.bz2
opensim-SC_OLD-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/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 6b4f377..b797cc3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
69 public InnerScene m_innerScene; 69 public InnerScene m_innerScene;
70 70
71 private Random Rand = new Random(); 71 private Random Rand = new Random();
72 private uint _primCount = 702000; 72 private uint _primCount = 720000;
73 private readonly Mutex _primAllocateMutex = new Mutex(false); 73 private readonly Mutex _primAllocateMutex = new Mutex(false);
74 74
75 private int m_timePhase = 24; 75 private int m_timePhase = 24;
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Environment.Scenes
113 113
114 protected int m_fps = 10; 114 protected int m_fps = 10;
115 protected int m_frame = 0; 115 protected int m_frame = 0;
116 protected float m_timespan = 0.1f; 116 protected float m_timespan = 0.089f;
117 protected DateTime m_lastupdate = DateTime.Now; 117 protected DateTime m_lastupdate = DateTime.Now;
118 118
119 protected float m_timedilation = 1.0f; 119 protected float m_timedilation = 1.0f;
@@ -750,8 +750,17 @@ namespace OpenSim.Region.Environment.Scenes
750 finally 750 finally
751 { 751 {
752 updateLock.ReleaseMutex(); 752 updateLock.ReleaseMutex();
753 // Get actual time dilation
754 float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds);
753 755
754 m_timedilation = m_timespan / (float)SinceLastFrame.TotalSeconds; 756 // If actual time dilation is greater then one, we're catching up, so subtract
757 // the amount that's greater then 1 from the time dilation
758 if (tmpval > 1.0)
759 {
760 tmpval = tmpval - (tmpval - 1.0f);
761 }
762 m_timedilation = tmpval;
763
755 m_lastupdate = DateTime.Now; 764 m_lastupdate = DateTime.Now;
756 } 765 }
757 } 766 }