diff options
author | Melanie | 2011-10-25 03:17:59 +0100 |
---|---|---|
committer | Melanie | 2011-10-25 03:17:59 +0100 |
commit | 6d4480c1cabdd91d956f9645cae50e9a99bb9d4d (patch) | |
tree | cfe24e6fe40801448d423e984da19f4b78b290e0 /OpenSim/Region | |
parent | Merge commit '6837e44d0707e501795df2d690c6005f5ba1d591' into bigmerge (diff) | |
parent | Get OdeScene to use passed in time step rather than hard-coded 0.089 (diff) | |
download | opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.zip opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.tar.gz opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.tar.bz2 opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.tar.xz |
Merge commit '9c430208769ab7fd7877093e278e8fcae02ecef3' into bigmerge
Diffstat (limited to 'OpenSim/Region')
3 files changed, 32 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b9e50c5..6a11353 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1194,7 +1194,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1194 | /// </summary> | 1194 | /// </summary> |
1195 | public void StartTimer() | 1195 | public void StartTimer() |
1196 | { | 1196 | { |
1197 | //m_log.Debug("[SCENE]: Starting timer"); | 1197 | // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); |
1198 | |||
1198 | //m_heartbeatTimer.Enabled = true; | 1199 | //m_heartbeatTimer.Enabled = true; |
1199 | //m_heartbeatTimer.Interval = (int)(m_timespan * 1000); | 1200 | //m_heartbeatTimer.Interval = (int)(m_timespan * 1000); |
1200 | //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); | 1201 | //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); |
@@ -1268,6 +1269,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1268 | 1269 | ||
1269 | ++Frame; | 1270 | ++Frame; |
1270 | 1271 | ||
1272 | // m_log.DebugFormat("[SCENE]: Processing frame {0}", Frame); | ||
1273 | |||
1271 | try | 1274 | try |
1272 | { | 1275 | { |
1273 | int tmpAgentMS = Util.EnvironmentTickCount(); | 1276 | int tmpAgentMS = Util.EnvironmentTickCount(); |
@@ -1392,6 +1395,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1392 | 1395 | ||
1393 | if (LoginsDisabled && Frame == 20) | 1396 | if (LoginsDisabled && Frame == 20) |
1394 | { | 1397 | { |
1398 | // m_log.DebugFormat("{0} {1} {2}", LoginsDisabled, m_sceneGraph.GetActiveScriptsCount(), LoginLock); | ||
1399 | |||
1395 | // In 99.9% of cases it is a bad idea to manually force garbage collection. However, | 1400 | // In 99.9% of cases it is a bad idea to manually force garbage collection. However, |
1396 | // this is a rare case where we know we have just went through a long cycle of heap | 1401 | // this is a rare case where we know we have just went through a long cycle of heap |
1397 | // allocations, and there is no more work to be done until someone logs in | 1402 | // allocations, and there is no more work to be done until someone logs in |
@@ -1408,8 +1413,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1408 | EventManager.TriggerLoginsEnabled(RegionInfo.RegionName); | 1413 | EventManager.TriggerLoginsEnabled(RegionInfo.RegionName); |
1409 | } | 1414 | } |
1410 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); | 1415 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); |
1416 | |||
1411 | // For RegionReady lockouts | 1417 | // For RegionReady lockouts |
1412 | if( LoginLock == false) | 1418 | if(LoginLock == false) |
1413 | { | 1419 | { |
1414 | LoginsDisabled = false; | 1420 | LoginsDisabled = false; |
1415 | } | 1421 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index 963d1e2..4c4f5fb 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | |||
105 | 105 | ||
106 | m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName); | 106 | m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName); |
107 | 107 | ||
108 | if(m_disable_logins == true) | 108 | if (m_disable_logins == true) |
109 | { | 109 | { |
110 | scene.LoginLock = true; | 110 | scene.LoginLock = true; |
111 | scene.LoginsDisabled = true; | 111 | scene.LoginsDisabled = true; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index a56a292..1d0c699 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -2640,24 +2640,27 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | |||
2640 | framecount++; | 2640 | framecount++; |
2641 | 2641 | ||
2642 | float fps = 0; | 2642 | float fps = 0; |
2643 | //m_log.Info(timeStep.ToString()); | ||
2644 | step_time += timeStep; | ||
2645 | |||
2646 | // If We're loaded down by something else, | ||
2647 | // or debugging with the Visual Studio project on pause | ||
2648 | // skip a few frames to catch up gracefully. | ||
2649 | // without shooting the physicsactors all over the place | ||
2650 | 2643 | ||
2651 | if (step_time >= m_SkipFramesAtms) | 2644 | float timeLeft = timeStep; |
2652 | { | 2645 | |
2653 | // Instead of trying to catch up, it'll do 5 physics frames only | 2646 | //m_log.Info(timeStep.ToString()); |
2654 | step_time = ODE_STEPSIZE; | 2647 | // step_time += timeStep; |
2655 | m_physicsiterations = 5; | 2648 | // |
2656 | } | 2649 | // // If We're loaded down by something else, |
2657 | else | 2650 | // // or debugging with the Visual Studio project on pause |
2658 | { | 2651 | // // skip a few frames to catch up gracefully. |
2659 | m_physicsiterations = 10; | 2652 | // // without shooting the physicsactors all over the place |
2660 | } | 2653 | // |
2654 | // if (step_time >= m_SkipFramesAtms) | ||
2655 | // { | ||
2656 | // // Instead of trying to catch up, it'll do 5 physics frames only | ||
2657 | // step_time = ODE_STEPSIZE; | ||
2658 | // m_physicsiterations = 5; | ||
2659 | // } | ||
2660 | // else | ||
2661 | // { | ||
2662 | // m_physicsiterations = 10; | ||
2663 | // } | ||
2661 | 2664 | ||
2662 | if (SupportsNINJAJoints) | 2665 | if (SupportsNINJAJoints) |
2663 | { | 2666 | { |
@@ -2683,13 +2686,11 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | |||
2683 | // Figure out the Frames Per Second we're going at. | 2686 | // Figure out the Frames Per Second we're going at. |
2684 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size | 2687 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size |
2685 | 2688 | ||
2686 | fps = (step_time / ODE_STEPSIZE) * 1000; | 2689 | fps = (timeStep / ODE_STEPSIZE) * 1000; |
2687 | // HACK: Using a time dilation of 1.0 to debug rubberbanding issues | 2690 | // HACK: Using a time dilation of 1.0 to debug rubberbanding issues |
2688 | //m_timeDilation = Math.Min((step_time / ODE_STEPSIZE) / (0.09375f / ODE_STEPSIZE), 1.0f); | 2691 | //m_timeDilation = Math.Min((step_time / ODE_STEPSIZE) / (0.09375f / ODE_STEPSIZE), 1.0f); |
2689 | 2692 | ||
2690 | step_time = 0.089f; | 2693 | while (timeLeft > 0.0f) |
2691 | |||
2692 | while (step_time > 0.0f) | ||
2693 | { | 2694 | { |
2694 | try | 2695 | try |
2695 | { | 2696 | { |
@@ -2829,7 +2830,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | |||
2829 | m_log.ErrorFormat("[PHYSICS]: {0}, {1}, {2}", e.Message, e.TargetSite, e); | 2830 | m_log.ErrorFormat("[PHYSICS]: {0}, {1}, {2}", e.Message, e.TargetSite, e); |
2830 | } | 2831 | } |
2831 | 2832 | ||
2832 | step_time -= ODE_STEPSIZE; | 2833 | timeLeft -= ODE_STEPSIZE; |
2833 | } | 2834 | } |
2834 | 2835 | ||
2835 | lock (_characters) | 2836 | lock (_characters) |