Beispiel #1
0
 public override void Restart()
 {
     ShouldExit = true;
     ScenePhysicsHeartbeat heartbeat = new ScenePhysicsHeartbeat(m_scene);
     m_scene.tracker.AddSceneHeartbeat(heartbeat, out m_scene.HeartbeatThread);
 }
Beispiel #2
0
 /// <summary>
 /// Start the timer which triggers regular scene updates
 /// </summary>
 public void StartTimer()
 {
     m_lastUpdate = Util.EnvironmentTickCount();
     if (UseTracker)
     {
         if (tracker == null)
             tracker = new AuroraThreadTracker();
         ScenePhysicsHeartbeat shb = new ScenePhysicsHeartbeat(this);
         SceneBackupHeartbeat sbhb = new SceneBackupHeartbeat(this);
         SceneUpdateHeartbeat suhb = new SceneUpdateHeartbeat(this);
         tracker.AddSceneHeartbeat(suhb, out HeartbeatThread);
         tracker.AddSceneHeartbeat(shb, out HeartbeatThread);
         tracker.AddSceneHeartbeat(sbhb, out HeartbeatThread);
         //tracker.AddSceneHeartbeat(new SceneHeartbeat(this), out HeartbeatThread);
         //Start this after the threads are started.
         tracker.Init(this);
         tracker.OnNeedToAddThread += NeedsNewThread;
     }
     else
         HeartbeatThread = Watchdog.StartThread(Update, "Heartbeat for region " + RegionInfo.RegionName, ThreadPriority.Normal, false);
 }