aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs41
1 files changed, 22 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 16ce1ba..d89d94d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -216,9 +216,7 @@ namespace OpenSim.Region.Framework.Scenes
216 // TODO: Possibly stop other classes being able to manipulate this directly. 216 // TODO: Possibly stop other classes being able to manipulate this directly.
217 private SceneGraph m_sceneGraph; 217 private SceneGraph m_sceneGraph;
218 private volatile int m_bordersLocked; 218 private volatile int m_bordersLocked;
219// private int m_RestartTimerCounter;
220 private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing 219 private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
221// private int m_incrementsof15seconds;
222 private volatile bool m_backingup; 220 private volatile bool m_backingup;
223 private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); 221 private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>();
224 private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); 222 private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>();
@@ -226,12 +224,17 @@ namespace OpenSim.Region.Framework.Scenes
226 private bool m_physics_enabled = true; 224 private bool m_physics_enabled = true;
227 private bool m_scripts_enabled = true; 225 private bool m_scripts_enabled = true;
228 private string m_defaultScriptEngine; 226 private string m_defaultScriptEngine;
227
228 /// <summary>
229 /// Tick at which the last login occurred.
230 /// </summary>
229 private int m_LastLogin; 231 private int m_LastLogin;
232
230 private Thread HeartbeatThread; 233 private Thread HeartbeatThread;
231 private volatile bool shuttingdown; 234 private volatile bool shuttingdown;
232 235
233 private int m_lastUpdate; 236// private int m_lastUpdate;
234 private bool m_firstHeartbeat = true; 237// private bool m_firstHeartbeat = true;
235 238
236 private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; 239 private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
237 private bool m_reprioritizationEnabled = true; 240 private bool m_reprioritizationEnabled = true;
@@ -801,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes
801 804
802 m_permissions = new ScenePermissions(this); 805 m_permissions = new ScenePermissions(this);
803 806
804 m_lastUpdate = Util.EnvironmentTickCount(); 807// m_lastUpdate = Util.EnvironmentTickCount();
805 } 808 }
806 809
807 #endregion 810 #endregion
@@ -1170,7 +1173,7 @@ namespace OpenSim.Region.Framework.Scenes
1170 HeartbeatThread.Abort(); 1173 HeartbeatThread.Abort();
1171 HeartbeatThread = null; 1174 HeartbeatThread = null;
1172 } 1175 }
1173 m_lastUpdate = Util.EnvironmentTickCount(); 1176// m_lastUpdate = Util.EnvironmentTickCount();
1174 1177
1175 HeartbeatThread 1178 HeartbeatThread
1176 = Watchdog.StartThread( 1179 = Watchdog.StartThread(
@@ -1222,8 +1225,8 @@ namespace OpenSim.Region.Framework.Scenes
1222 while (!shuttingdown) 1225 while (!shuttingdown)
1223 Update(-1); 1226 Update(-1);
1224 1227
1225 m_lastUpdate = Util.EnvironmentTickCount(); 1228// m_lastUpdate = Util.EnvironmentTickCount();
1226 m_firstHeartbeat = false; 1229// m_firstHeartbeat = false;
1227 } 1230 }
1228 finally 1231 finally
1229 { 1232 {
@@ -2541,7 +2544,7 @@ namespace OpenSim.Region.Framework.Scenes
2541 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 2544 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0
2542 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; 2545 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
2543 2546
2544 CheckHeartbeat(); 2547// CheckHeartbeat();
2545 2548
2546 ScenePresence sp = GetScenePresence(client.AgentId); 2549 ScenePresence sp = GetScenePresence(client.AgentId);
2547 2550
@@ -3117,7 +3120,7 @@ namespace OpenSim.Region.Framework.Scenes
3117 3120
3118 public override void RemoveClient(UUID agentID, bool closeChildAgents) 3121 public override void RemoveClient(UUID agentID, bool closeChildAgents)
3119 { 3122 {
3120 CheckHeartbeat(); 3123// CheckHeartbeat();
3121 bool isChildAgent = false; 3124 bool isChildAgent = false;
3122 ScenePresence avatar = GetScenePresence(agentID); 3125 ScenePresence avatar = GetScenePresence(agentID);
3123 if (avatar != null) 3126 if (avatar != null)
@@ -4516,7 +4519,7 @@ namespace OpenSim.Region.Framework.Scenes
4516 else 4519 else
4517 return health; 4520 return health;
4518 4521
4519 CheckHeartbeat(); 4522// CheckHeartbeat();
4520 4523
4521 return health; 4524 return health;
4522 } 4525 }
@@ -4704,14 +4707,14 @@ namespace OpenSim.Region.Framework.Scenes
4704 return (((vsn.X * xdiff) + (vsn.Y * ydiff)) / (-1 * vsn.Z)) + p0.Z; 4707 return (((vsn.X * xdiff) + (vsn.Y * ydiff)) / (-1 * vsn.Z)) + p0.Z;
4705 } 4708 }
4706 4709
4707 private void CheckHeartbeat() 4710// private void CheckHeartbeat()
4708 { 4711// {
4709 if (m_firstHeartbeat) 4712// if (m_firstHeartbeat)
4710 return; 4713// return;
4711 4714//
4712 if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) 4715// if (Util.EnvironmentTickCountSubtract(m_lastFrameTick) > 2000)
4713 StartTimer(); 4716// StartTimer();
4714 } 4717// }
4715 4718
4716 public override ISceneObject DeserializeObject(string representation) 4719 public override ISceneObject DeserializeObject(string representation)
4717 { 4720 {