From 6e8496ffc5783c68e546908a0459539639005385 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 23 Mar 2012 01:03:10 +0000 Subject: [PATCH] Comment out unused scene loop restart code. This has actually been unused since at least 0.7.2 due to earlier changes. --- OpenSim/Region/Framework/Scenes/Scene.cs | 41 +++++++++++++----------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c503907192..d51701a9af 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -203,9 +203,7 @@ namespace OpenSim.Region.Framework.Scenes // TODO: Possibly stop other classes being able to manipulate this directly. private SceneGraph m_sceneGraph; private volatile int m_bordersLocked; -// private int m_RestartTimerCounter; private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing -// private int m_incrementsof15seconds; private volatile bool m_backingup; private Dictionary m_returns = new Dictionary(); private Dictionary m_groupsWithTargets = new Dictionary(); @@ -213,12 +211,17 @@ namespace OpenSim.Region.Framework.Scenes private bool m_physics_enabled = true; private bool m_scripts_enabled = true; private string m_defaultScriptEngine; + + /// + /// Tick at which the last login occurred. + /// private int m_LastLogin; + private Thread HeartbeatThread; private volatile bool shuttingdown; - private int m_lastUpdate; - private bool m_firstHeartbeat = true; +// private int m_lastUpdate; +// private bool m_firstHeartbeat = true; private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; private bool m_reprioritizationEnabled = true; @@ -795,7 +798,7 @@ namespace OpenSim.Region.Framework.Scenes m_permissions = new ScenePermissions(this); - m_lastUpdate = Util.EnvironmentTickCount(); +// m_lastUpdate = Util.EnvironmentTickCount(); } #endregion @@ -1134,7 +1137,7 @@ namespace OpenSim.Region.Framework.Scenes HeartbeatThread.Abort(); HeartbeatThread = null; } - m_lastUpdate = Util.EnvironmentTickCount(); +// m_lastUpdate = Util.EnvironmentTickCount(); HeartbeatThread = Watchdog.StartThread( @@ -1186,8 +1189,8 @@ namespace OpenSim.Region.Framework.Scenes while (!shuttingdown) Update(); - m_lastUpdate = Util.EnvironmentTickCount(); - m_firstHeartbeat = false; +// m_lastUpdate = Util.EnvironmentTickCount(); +// m_firstHeartbeat = false; } catch (ThreadAbortException) { @@ -2487,7 +2490,7 @@ namespace OpenSim.Region.Framework.Scenes = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; - CheckHeartbeat(); +// CheckHeartbeat(); ScenePresence sp = GetScenePresence(client.AgentId); @@ -3065,7 +3068,7 @@ namespace OpenSim.Region.Framework.Scenes public override void RemoveClient(UUID agentID, bool closeChildAgents) { - CheckHeartbeat(); +// CheckHeartbeat(); bool isChildAgent = false; ScenePresence avatar = GetScenePresence(agentID); if (avatar != null) @@ -4469,7 +4472,7 @@ namespace OpenSim.Region.Framework.Scenes else return health; - CheckHeartbeat(); +// CheckHeartbeat(); return health; } @@ -4657,14 +4660,14 @@ namespace OpenSim.Region.Framework.Scenes return (((vsn.X * xdiff) + (vsn.Y * ydiff)) / (-1 * vsn.Z)) + p0.Z; } - private void CheckHeartbeat() - { - if (m_firstHeartbeat) - return; - - if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) - StartTimer(); - } +// private void CheckHeartbeat() +// { +// if (m_firstHeartbeat) +// return; +// +// if (Util.EnvironmentTickCountSubtract(m_lastFrameTick) > 2000) +// StartTimer(); +// } public override ISceneObject DeserializeObject(string representation) {