Browse Source

fix task.time within a sequence

David Rose 17 years ago
parent
commit
0109374689
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/event/asyncTaskSequence.cxx

+ 4 - 0
panda/src/event/asyncTaskSequence.cxx

@@ -194,5 +194,9 @@ set_current_task(AsyncTask *task, bool clean_exit) {
     nassertv(_current_task->_manager == NULL);
     _current_task->_manager = _manager;
     _current_task->_state = S_active_nested;
+
+    double now = _manager->_clock->get_frame_time();
+    task->_start_time = now;
+    task->_start_frame = _manager->_clock->get_frame_count();
   }
 }