]> git.mxchange.org Git - flightgear.git/commitdiff
Run a registered event as it's registered and then at the specified interval.
authorcurt <curt>
Fri, 12 Apr 2002 05:07:28 +0000 (05:07 +0000)
committercurt <curt>
Fri, 12 Apr 2002 05:07:28 +0000 (05:07 +0000)
src/Time/FGEventMgr.cxx

index c8aedd48897cc2a30de68936b82b6908a2bb970e..d22c3b9289f9f15815d4af58282bdb7bbb1bcc7e 100644 (file)
@@ -36,6 +36,8 @@ FGEventMgr::FGEvent::FGEvent( const char* name,
       max_time(0),
       count(0)
 {
+    if (status == FG_EVENT_READY)
+       this->run();
 }
 
 
@@ -131,8 +133,6 @@ FGEventMgr::update( int dt )
 void
 FGEventMgr::Register( const FGEvent& event )
 {
-//     if (event.is_ready())
-//     event.run();
     event_table.push_back( event );
 
     SG_LOG( SG_EVENT, SG_INFO, "Registered event " << event.name()